Go to main content

Oracle® ZFS Storage Appliance 管理指南,发行版 OS8.8.0

退出打印视图

更新时间: 2018 年 11 月
 
 

编辑角色的授权 (CLI)

角色是可分配给用户的一组特权 。使用以下过程编辑角色的授权。

  1. 转至 configuration roles
  2. 键入 select,后跟角色名称。
  3. 键入 authorizations
  4. 键入 create 添加授权。
  5. 键入 set scope=,后跟范围名称。使用 Tab 补齐功能查看列表。
  6. 键入 show 查看可用的过滤器和授权。
  7. 键入 set 将所需授权设置为 "true",然后设置过滤器(如果有)。Tab 补齐功能可帮助显示有效的过滤器设置。
  8. 键入 commit

    现在即已添加授权。

示例 7  添加授权以重新启动 HTTP 服务

此示例添加授权以重新启动 HTTP 服务。此示例还显示了 Tab 补齐功能的输出,其中列出了有效的输入,在确定有效范围和过滤器选项时很有用。

hostname:configuration roles > select webadmin
hostname:configuration roles webadmin > authorizations
hostname:configuration roles webadmin authorizations > create
hostname:configuration roles webadmin auth (uncommitted) > set scope=tab 
ad           cluster      net          schema       update       
alert        hardware     replication  stat         user         
appliance    nas          role         svc          worksheet    
hostname:configuration roles webadmin auth (uncommitted) > set scope=svc
                         scope = svc
hostname:configuration roles webadmin auth (uncommitted) > show
Properties:
                         scope = svc
                       service = *
              allow_administer = false
               allow_configure = false
                 allow_restart = false

hostname:configuration roles webadmin auth (uncommitted) > set service=tab 
*               ftp             ipmp            nis             ssh
ad              http            iscsi           ntp             tags
smb            identity        ldap            routing         vscan
datalink:igb0   idmap           ndmp            scrk            
dns             interface:igb0  nfs             snmp            
hostname:configuration roles webadmin auth (uncommitted) > set service=http
                       service = http (uncommitted)
hostname:configuration roles webadmin auth (uncommitted) > set allow_restart=true
                 allow_restart = true (uncommitted)
hostname:configuration roles webadmin auth (uncommitted) > commit
hostname:configuration roles webadmin authorizations > list
NAME       OBJECT                               PERMISSIONS
auth-000   svc.http                             restart

相关主题