pw user edit


The pw user edit command enables you to update the various details of an existing user.

Warning

Note

You cannot change the password of a user by using the pw user edit command.

The pw user edit command can be run by the following user:

  • The root user on UNIX or Linux or the Administrator user or users belonging to the group Administrators on Windows
  • BMC ProactiveNet user with administrative privileges. For more information, see Users with administrative privileges.

The syntax for this command is as follows:

pw user edit <user_name>
[-displayname  <name>]
[-email  <mail_id>]
[-add_usergroup <usergroup1,usergroup2....usergroupN>]
[-update_usergroup <usergroup1,usergroup2....usergroupN>]
[-delete_usergroup <usergroup1,usergroup2....usergroupN>]
[-passwordForceChange]
[-passwordExpiryPeriod <no_of_days>]
  • <user_name> — A string representing a user name. A user with this name must already exist. 
  • -displayname(Optional) A string representing a display name for the user. 
  • -email — (Optional) A contact email address. 
  • -add_usergroup <usergroup1,usergroup2....usergroupN>(Optional) A comma-separated string of new user group names that this user must be associated with, along with the existing user groups associated with the user. 
  • -update_usergroup <usergroup1,usergroup2....usergroupN>(Optional) A comma-separated string of user group names that this user must be associated with. The existing user groups associated with the user are replaced with these user groups.}
  • -delete_usergroup <usergroup1,usergroup2....usergroupN>(Optional) A comma-separated string of user group names this user must be dissociated from
  • -passwordForceChange(Optional) Forces user to change password at the first or subsequent login 
  • -passwordExpiryPeriod(Optional) The period (in days) after which the password expires. 

Examples:

  • To edit user1 and add user groups, group5, group8, and group9; delete user group2 and group4; and edit email with the email id newmail@bmc.com:
    pw user edit user1-add_usergroup group5,group8,group9 -delete_usergroup group2,group4 -email newmail@bmc.com
  • To edit user2 with displayname newuser2 and to set the password expiry period to 365 days:
    pw user edit user2 -displayname newuser2 -passwordExpiryPeriod 365 
  • To edit user5 to forcefully change the password at next login:
    pw user edit user5 -passwordForceChange 

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*

BMC ProactiveNet 9.6