For the complete documentation index, see llms.txt. This page is also available as Markdown.

Manage users using the CLI

Manage local users, authentication tokens, and LDAP or Active Directory directories using the CLI.

Create a local user

Creates a local cluster user with a role that determines what the user can do.

Command: weka user add

weka user add <username> <role> [<password>] [--posix-gid <uint32>] [--posix-uid <uint32>]

Parameters

Parameter
Description

username*

Username for new user. The user must present this to login.

role*

Role for new user. Possible values: clusteradmin, csi, tenantadmin, readonly, regular, s3

password

Password for new user. Must contain at least 8 characters, and have at least one uppercase letter, one lowercase letter, and one number or special character. Typing special characters as arguments to this command might require escaping.

--posix-gid <uint32>

POSIX group ID for user. Used for S3 only.

--posix-uid <uint32>

POSIX user ID for user. Used for S3 only.

Display list of users

Run the weka user command to display the list of users defined in WEKA.

$ weka user
Username    | Source   | Role
------------+----------+--------
my_new_user | Internal | Regular
admin       | Internal | Admin

Display current user information

Run the weka user whoami command to receive information about the current user running the command.

To use the new user credentials, use theWEKA_USERNAME and WEKA_PASSWORDenvironment variables:

Log-in to the WEKA cluster

Authenticates to the cluster and saves a login token, so later commands run without prompting.

Command: weka user login

Parameters

Parameter
Description

username

Username of user for authentication. Can be supplied in the envrionment as 'WEKA_USERNAME'. Prompted for if not set.

password

Password of the user to authenticate as. Can be supplied in the environment as 'WEKA_PASSWORD'. Prompted for if not set.

-p, --path <string>

The path where the login token will be saved. This path can also be specified using the WEKA_TOKEN environment variable. After logging in, use the WEKA_TOKEN environment variable to specify where the login token is located. Deprecated: Use of profiles is a better solution, or use the weka user generate-token command to create a suitable API token. default: ~/.weka/auth-token.json). This path can also be specified using the WEKA_TOKEN environment variable. After logging-in, use the WEKA_TOKEN environment variable to specify where the login token is located

-g, --tenant <string>

Tenant where the user is located.

Related topic

Obtain authentication tokens

Change a local user password

Changes a local user's password.

Command: weka user passwd

Parameters

Parameter
Description

password

New password. Must contain at least 8 characters, and have at least one uppercase letter, one lowercase letter, and one number or special character. Typing special characters as arguments to this command might require escaping.

--current-password <string>

Current password. Only required when changing the current user's own password.

--username <username>

User to change the password for. Defaults to the currently logged-in user.

  • If necessary, provide or setWEKA_USERNAME or WEKA_PASSWORD.

  • To regain access to the system after changing the password, the user must re-authenticate using the new password.

Reset your own S3 credentials

Reset the S3 API credentials for your user account by generating a new access key and secret key.

Before you begin

Confirm that you have existing S3 credentials. If you also need to reset your WEKA account password, note that the two operations are independent. Resetting your WEKA account password does not affect S3 credentials.

Procedure

  1. Run the following command:

  1. At the prompt, review the message and type yes to confirm, or no to cancel.

The system generates and displays a new access key and secret key for your S3 API access.

Result

Your new S3 credentials are displayed. Store the secret key securely, as it is not retrievable after the session ends.

Revoke user access

Revokes all of a user's login tokens, forcing the user to authenticate again.

Command: weka user revoke-tokens

Parameters

Parameter
Description

username*

Username of the user whose tokens will be revoked.

Update a local user

Changes a local user's role or password policy.

Command: weka user update

Parameters

Parameter
Description

username*

Username of user to update.

--posix-gid <uint32>

POSIX group ID for user. Used for S3 only.

--posix-uid <uint32>

POSIX user ID for user. Used for S3 only.

--role <user-role>

New role to set for the user. Possible values: clusteradmin, csi, tenantadmin, readonly, regular, s3

Delete a local user

Deletes a local user from the cluster.

Command: weka user remove

Parameters

Parameter
Description

username*

Username of user to delete.

Authenticate users from an LDAP user directory

To authenticate users from an LDAP user directory, the LDAP directory must first be configured to the Weka system. This is performed as follows.

Configure an LDAP user directory

Configures the LDAP directory the cluster authenticates users against. Use setup for a generic LDAP server and setup-ad for Active Directory.

Command: weka user ldap setup

Command: weka user ldap setup-ad

Parameters

Parameter
Description

server-uri*

LDAP server URI. Format is either [ldap://]hostname[:port] or ldaps://hostname[:port].

base-dn*

Base DN.

user-object-class*

User object class.

user-id-attribute*

User ID attribute.

group-object-class*

Group object class.

group-membership-attribute*

Group membership attribute.

group-id-attribute*

Group ID attribute.

reader-username*

Reader username.

reader-password

Reader password. If omitted, you will be prompted.

--cluster-admin-group <string>

ClusterAdmin LDAP group. Users in this group are assigned the ClusterAdmin role. Only available for the root tenant.

--csi-group <string>

CSI LDAP group. Users in this group are assigned the CSI role.

--ignore-start-tls-failure

Ignore StartTLS failure. If StartTLS fails, the connection will not use encryption. Possible values: yes or no

--network-space-id <uint16>

Network space ID in which to run LDAP queries. Defaults to the host network namespace.

--protocol-version <uint>

LDAP protocol version. Possible values: LDAP v2 or LDAP v3

--readonly-group <string>

ReadOnly LDAP group. Users in this group are assigned the ReadOnly role.

--regular-group <string>

Regular LDAP group. Users in this group are assigned the Regular role.

--server-timeout-secs <duration>

LDAP server connection timeout, specified in seconds.

--start-tls

Issue StartTLS after connecting. URL should not be used with ldaps://. Possible values: yes or noDo not use with ldaps://

--tenant-admin-group <string>

TenantAdmin LDAP group. Users in this group are assigned the TenantAdmin role.

--user-revocation-attribute <string>

User revocation attribute. If provided, updating this attribute in the LDAP server automatically revokes all user tokens.

--user-uuid-attribute <string>

User UUID attribute.

domain*

Active Directory domain for principals.

The sAMAccountName (user logon name) for roles such as Cluster Admin, Tenant Admin, Regular User, and Read-only User is limited to 20 characters.

View a configured LDAP User Directory

Shows the configured LDAP user directory and its current settings.

Command: weka user ldap

Disable or enable a configured LDAP user directory

Turns LDAP authentication off or back on without discarding the directory configuration.

Command: weka user ldap disable

Command: weka user ldap enable

Parameters

Parameter
Description

-f, --force

Force action. Perform this action without further confirmation.

You can only disable an LDAP configuration, but not delete it.

Last updated