Smarts SAM: How do I clone a user from the command line interface (CLI)?
search cancel

Smarts SAM: How do I clone a user from the command line interface (CLI)?

book

Article ID: 331826

calendar_today

Updated On:

Products

VMware Smart Assurance

Issue/Introduction

How to clone a user from the command line interface (CLI)

Environment

VMware Smart Assurance - SMARTS

Resolution

How do I clone a user from the command line interface (CLI) for Smarts Service Assurance Manager (Smarts SAM)?
How do I clone a user and assign it to a profile in Smarts SAM if I do not have access to sm_gui?




You can use the Smarts dmctl Clone command to clone a user in the CLI for Smarts SAM as described in the following sections. Note that users newly created like this will not have a profile, so you must assign it a profile after you clone it.

How to get a list of available users:

Command Syntax
dmctl -s <Domain name> getI ICS_user

Command Example
bash-3.2$ ./dmctl -s T-SAM813 getI ICS_User
Server T-SAM813 User: admin
admin's Password: XXXXXXXXXX
ICS-User-admin
ICS-User-default
ICS-User-maint
ICS-User-oper

How to check to see what operations are available:

Command Syntax
dmctl -s <domain name> getOper ICS_User

Command Example
bash-3.2$ ./dmctl -s T-SAM813 getOper ICS_User
Server T-SAM813 User: admin
admin's Password: XXXXXXXXXX

Operations for class ICS_User
    <object> clone <string>clone_name
    <void> changed


How to Clone a user

Note: In the following, "username" is an existing ICS-User and "new user" is the user name you're creating.

Command Syntax
dmctl -s <domain name> invoke ICS_User::ICS-User-"username" clone "new user"

Command Example
bash-3.2$ ./dmctl -s T-SAM813 invoke ICS_User::ICS-User-admin clone NewUser
Server T-SAM813 User: admin
admin's Password: XXXXXXXXXX
ICS_User::NewUser

Command to verify
bash-3.2$ ./dmctl -s T-SAM813 getI ICS_User
Server T-SAM813 User: admin
admin's Password: XXXXXXXXXX
ICS-User-admin
ICS-User-default
ICS-User-maint
ICS-User-oper
NewUser

How to get details on a user. NOTE: "user" would be a pre-existing user

Command Syntax
dmctl -s <domain name> get ICS_User::ICS-User-"user"

Command Example
bash-3.2$ ./dmctl -s T-SAM813 get ICS_User::ICS-User-admin
Server T-SAM813 User: admin
admin's Password: XXXXXXXXXX

Properties of ICS_User::ICS-User-admin:
    CreationClassName = ICS_User
          Description =
          DisplayName = admin
        LastChangedAt = 1348769637
             MemberOf = ICS_UserProfile::ICS-PROFILE-admin-profile
                 Name = ICS-User-admin
          ServiceName =
             UserName = admin
               enable = TRUE

How to assign the user to an existing profile     

Command Syntax
dmctl s <SAM_Domain> put ICS_User::ICS-User-admin::MemberOf ICS_UserProfile::ICS-PROFILE-admin-profile

Command Example
bash-3.2$ ./dmctl -s T-SAM813 put ICS_User::NewUser::MemberOf ICS_UserProfile::ICS-PROFILE-admin-profile
Server T-SAM813 User: admin
admin's Password: XXXXXXXXXX

Command to verify
bash-3.2$ ./dmctl -s T-SAM813 get ICS_User::NewUser
Server T-SAM813 User: admin
admin's Password: XXXXXXXXXX

Properties of ICS_User::NewUser:
    CreationClassName = ICS_User
          Description =
          DisplayName = admin
        LastChangedAt = 1348769637
             MemberOf = ICS_UserProfile::ICS-PROFILE-admin-profile
                 Name = NewUser
          ServiceName =
             UserName = admin
               enable = TRUE