Resets the Couchbase administrator password. This command replaces the
The basic syntax is:
couchbase-cli reset-admin-password [--cluster <url>] [--regenerate] [--new-password <password>]
This command is used to reset the built-in Couchbase Server Administrator password. There is only one built-in Administrator account, which is managed separately from External Administrator users. The built-in Read-only Administrator account can be managed using the user-manage command. External Administrator accounts (via LDAP) can be managed using the admin-role-manage command.
reset-admin-password command must be run locally on a node that is part of the cluster (i.e.
must connect to the host which the command is run on).
This is required as
reset-admin-password relies on a local authentication token, which is used to authenticate with the server and change the password.
In 4.6.x you must also specify a username and password (
-p) as part of the command, although these are ignored (even if they are invalid).
In future releases of Couchbase Server these credentials will not be required.
The following are the command options:
Sets the password for the Couchbase Server administrator user to the value specified by the argument. If no password is specified, the command prompts the user for the new password through non-echoed stdin.
Sets the password for the Couchbase Server administrator user to a randomly generated value. The new password is printed to the command line after the password is changed.
To change the administrator password to 'new_pwd' run the following command:
$ couchbase-cli reset-admin-password -c localhost:8091 -u my_user -p my_password --new-password new_pwd
To change the administrator password to a randomly generated value, run the following command. The new password will be printed to stdout if the password is successfully changed:
$ couchbase-cli reset-admin-password -c localhost:8091 -u my_user -p my_password --regenerate jXjNW6LG