Command
weka user addUse the following command line to create a user:
weka user add <username> <role> [password] [--posix-uid uid] [--posix-gid gid]
Parameters
Name | Type | Value | Limitations | Mandatory | Default |
---|---|---|---|---|---|
username | String | Name of the user to change the password for | Must be a valid local user | Yes | |
role | String | Role of the new created user | regular, readonly, orgadmin or clusteradmin | Yes | |
password | String | New password | No | If not supplied, command will prompt to supply the password | |
posix-uid | Number | POSIX UID of underlying files representing objects created by this S3 user access/keys credentials | For S3 user roles only | No | 0 |
posix-gid | Number | POSIX GID of underlying files representing objects created by this S3 user access/keys credentials | For S3 user roles only | No | 0 |
For example,
$ weka user add my_new_user regular S3cret
This command line creates a user with a username of my_new_user, a password of S3cret and a role of Regular user. It is then possible to display a list of users and verify that the user was created:
1 $ weka user 2 Username | Source | Role 3 ------------+----------+-------- 4 my_new_user | Internal | Regular 5 admin | Internal | Admin
Using the weka user whoami command, it is possible to receive information about the current user running the command.
To use the new user credentials, use the WEKA_USERNAME and WEKA_PASSWORD environment variables:
$ WEKA_USERNAME=my_new_user WEKA_PASSWORD=S3cret 1 weka user whoami 2 Username | Source | Role 3 ------------+----------+-------- 4 my_new_user | Internal | Regular