user_create
This job creates a new user and syncs the change on all nodes.
Mandatory parameters
| Parameter name | Data type | Description |
|---|---|---|
| username | string | Name of the new user. Example: user_1. |
| userid | integer | ID of the new user in integer format. Example: 1001 |
| password | string | Password for the new user. |
| group | string, integer | Group ID or group name for the group that the new user should belong to. Example: exausers |
| login_enabled | boolean | Boolean value defining if login is allowed (true) or not (false). |
Optional parameters
| Parameter name | Data type | Description |
|---|---|---|
| additional_groups | list | Comma-separated list of group names of additional groups that the new user should be a member of. Example: [root, exausers] |
| authorized_keys | list | A list of authorized keys for the new user. |
| encode_passwd | boolean | Boolean value defining if the password should be encoded (true) or not encoded (false). |
Substitute parameters
There are no substitute parameters.
Allowed users
The following users are allowed to run this job:
- root
Allowed groups
The following groups are allowed to run this job:
- root
- exaadm
Examples
The following examples show how to run this job in a Python program using XML-RPC or on the command line using confd_client.
conn.job_exec('user_create', {'params': {'username': 'user_1', 'userid': 1001, 'password': 'secret_password', 'group': 'exausers', 'login_enabled': True}})
confd_client user_create username: user_1 userid: 1001 password: secret_password group: exausers login_enabled: true