Monday, 15 April 2013

HMC Tips III - User Management


1. To list all users in a HMC

# lshmcusr

2. To list only user names and managed resource roles for all HMC users :

# lshmcusr -F name:resourcerole

3. To create a user :

# mkhmcusr -u User_Id -a ROLE -d DESCRIPTION --passwd PASSWORD -MPASSWD_EXPIRATION_DAYS

4. To remove a user :

# rmhmcusr -u USER_NAME

5. To change an hmc user's password :

# chhmcusr -u User_Name -t passwd -v New_Password

6. To change the task role for the user "user1" to hmcoperator :

# chhmcusr -r user1 -t taskrole -v hmcoperator

Available task roles are hmcsuperadmin, hmcoperator, hmcviewer, hmcpe, hmcservicerep or a user defined task role

7. To list all managed resource objects :

# lsaccfg -t resource

8. To list all managed resource roles :

# lsaccfg -t resourcerole

9. To create a task role using a config file :

# mkaccfg -t resourcerole -f /tmp/fil1

10. To create a task role :

# mkaccfg -t taskrole -i "name=tr1,parent=hmcsuperadmin,"resources=cec:chcod+lscod+lshwres,lpar:chssyscfg+lssyscfg+mksyscfg"


11. To change a task role :

# chaccfg -t taskrole -i "name=tr1,"resources=cec:chhwres+chsysstate,lpar:chssyscfg+chled+chhwres""

12. To remove a task role :

# rmaccfg -t taskrole -n tr1

1 comment:

  1. chhmcusr -r user1 -t taskrole -v hmcsuperadmin
    The command entered is either missing a required parameter or a parameter value is invalid. The parameters that are missing or have an invalid value are -u. Please check your entry and retry the command.

    Throwd an error

    Tried with below command and it worked

    chhmcusr -u user1 -t taskrole -v hmcsuperadmin

    ReplyDelete