tw_adduser
The tw_adduser utility enables you to add a new user to the system, and assign a user to a new group.
To use the utility, type the following command at the $TIDEWAY/bin/ directory:
tw_adduser [options] username
where:
- username is the name of the new user.
If you do not specify a user name, BMC Discovery will use the default, system.
- options are any of the options described in the following table and the common command line options described in Using-command-line-utilities.
Command Line Option | Description |
|---|---|
-f, | (Optional) Specifies the full name of the user |
-g, | (Optional) Specifies additional groups to add a user to (the default value is public). The value public is also the default when you select the Groups option from the Add User page on the Administration tab. |
| --no-force-password-change | Specifies that the user does not have to change their password at their first login, though this is not recommended. |
-p, | The password for the new user. |
| --password-not-permitted | Specify this option for API users. When you do so, a password is not created for the user, but the utility prints a non-expiring token that you use in the client you want to access the API. |
User examples
Adding a new user to multiple groups
In the following example, you can add a new admin user to a multiple groups by using the --groups option, and a comma-separated list of groups.
$TIDEWAY/bin/tw_adduser --groups=discovery,admin newusername
Adding a new api user
In the following example, you can add a new API user to the api-access group by using the --groups and --password-not-permitted options. The token is printed to stdout and should be used in the client you ware using with the API.
$TIDEWAY/bin/tw_adduser --groups api-access --password-not-permitted USERNAME
MzpmMWRlY2YzOTQyZmI4YzE5NWQ1NjBhMzEyMzZmMDcxZDpVU0VSTkFNRTowLWNmZjJlZjIxYTIxYjU2MjBmYzA3MzlhNDI2NzdiZDk1ZDJmMDE1ODk2ZmEwNjU0NzkxNzg4MmIyMjA3MzM2ZTk=
You can regenerate the same key for a user with the tw_upduser utility.