Go to main content

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

退出打印视图

更新时间: 2018 年 11 月
 
 

添加管理员或用户 (CLI)

使用以下过程创建有或没有管理员角色的用户。有关用户类型的描述,请参见了解用户和角色

  1. 转至 configuration users
    hostname:> configuration users
    
  2. 键入以下用户类型之一并后跟一个名称。

    directory-用于目录用户(NIS、LDAP)。

    local-用于本地用户。

    data-用于纯数据用户。

    nologin-用于无登录用户。

  3. 键入 get 以列出需要设置的必需属性。
    hostname:configuration users john (uncommitted)> get
                           logname = john
                               uid = (unset)
                          fullname = (unset)
                  initial_password = (unset)
                require_annotation = false
    
  4. 键入 set 和要设置的属性,然后键入 commit
    hostname:configuration users john (uncommitted)> set initial_password=password
                  initial_password = (set) (uncommitted)
    hostname:configuration users john (uncommitted)> commit
    

    此时即已创建用户,但是尚未定制其所有属性。

  5. (u53ef选) 要为本地用户或目录用户添加角色,请键入 select 并添加用户名。
  6. (u53ef选) 键入 show 查看首选项的完整列表。

    现在可以为用户添加角色和授权例外。

示例 2  创建本地用户
hostname:configuration users > local john
hostname:configuration users john (uncommitted) > get
                       logname = john
                           uid = (unset)
                      fullname = (unset)
              initial_password = (unset)
            require_annotation = false
hostname:configuration users john (uncommitted) > set initial_password=password
              initial_password = (set) (uncommitted)
hostname:configuration users john (uncommitted) > commit
hostname:configuration users > select john
hostname:configuration users john > show
Properties:
                       logname = john
                          type = local
                           uid = 
                      fullname = 
              initial_password = (set)
            require_annotation = false
                         roles = 
                    kiosk_mode = false
                  kiosk_screen = status/dashboard

Children:
                       exceptions => Configure this user's exceptions
                      preferences => Configure user preferences

hostname:configuration users john > set roles=
basic       basic2      test_role1  test_role2
hostname:configuration users john > set roles=basic
                         roles = basic (uncommitted)
hostname:configuration users john > commit
hostname:configuration users > select john
hostname:configuration users john > show
Properties:
                       logname = john
                          type = local
                           uid = 
                      fullname = 
              initial_password = (set)
            require_annotation = false
                         roles = basic
                    kiosk_mode = false
                  kiosk_screen = status/dashboard

Children:
                       exceptions => Configure this user's exceptions
                      preferences => Configure user preferences

相关主题