使用以下过程创建有或没有管理员角色的用户。有关用户类型的描述,请参见了解用户和角色。
hostname:> configuration users
directory-用于目录用户(NIS、LDAP)。
local-用于本地用户。
data-用于纯数据用户。
nologin-用于无登录用户。
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 = ******** (uncommitted)
hostname:configuration users john (uncommitted)> commit
                此时即已创建用户,但是尚未定制其所有属性。
现在可以为用户添加角色和授权例外。
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 = ******** (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 = *************
            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 = *************
            require_annotation = false
                         roles = basic
                    kiosk_mode = false
                  kiosk_screen = status/dashboard
Children:
                       exceptions => Configure this user's exceptions
                      preferences => Configure user preferences