Manage the password policy for new users
couchbase-cli setting-password-policy [--cluster <url>] [--username <user>]
[--password <password>] [--get] [--set] [--min-length <num>] [--uppercase]
[--lowercase] [--digits] [--special-chars]
Allows retrival of the current password policy and creating a new password policy for new Couchbase users. This allows administrators to customize the complexity of user passwords.
- --get
-
Retrieves the current password policy.
- --set
-
Creates a new password policy. Use the flags below to specify different levels of password complexity required for new users and users who change their existing passwords.
- --min-length <num>
-
Specifies the minimum password length for new passwords.
- --uppercase
-
Specifies that new passwords must contain at least one upper case letter.
- --lowercase
-
Specifies that new passwords must contain at least one lower case letter.
- --digit
-
Specifies that new passwords must contain at least one digit.
- --special-char
-
Specifies that new passwords must contain at least one special character.
To get the current password policy run the following command.
$ couchbase-cli setting-password-policy -c 192.168.1.5 -u Administrator \ -p password --get
To set a new password policy where the minimum password length is 10 character and require that all passwords contain an upper case letter, lower case letter, and a digit run the following command.
$ couchbase-cli setting-password-policy -c 192.168.1.5 -u Administrator \ -p password --set --min-length 10 --uppercase --lowercase --digits
man:couchbase-cli[1], man:couchbase-cli-user-manage[1]