reset-admin-password
Resets the Couchbase Server administrator password
SYNOPSIS
couchbase-cli reset-admin-password [--cluster <url>] [--regenerate] [--new-password <password>]
DESCRIPTION
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 the internal and external Administrator users. External and Internal Administrator accounts can be managed using the user-manage command.
The reset-admin-password
command must be run locally on a node that is part of the
cluster (i.e. must connect to the host 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. As a result, the command does not require
credentials to be passed.
OPTIONS
- -c
- --cluster
-
Specfies the hostname of a node in the cluster. See the HOST FORMATS section for more information on specifying a hostname.
- --new-password <password>
-
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.
- --regenerate
-
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.
HOST FORMATS
When specifying a host for the couchbase-cli command the following formats are expected:
-
couchbase://<addr>
-
<addr>:<port>
-
http://<addr>:<port>
It is recommended to use the couchbase://<addr> format for standard installations. The other two formats allow an option to take a port number which is needed for non-default installations where the admin port has been set up on a port other that 8091.
EXAMPLES
To change the administrator password to new_pwd run the following command:
$ couchbase-cli reset-admin-password -c 192.168.1.5:8091 \ --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 192.168.1.5:8091 --regenerate jXjNW6LG
ENVIRONMENT AND CONFIGURATION VARIABLES
- CB_REST_PASSWORD
-
Specifies the password of the user executing the command. This environment variable allows you to specify a default argument for the -p/--password argument on the command line. It also allows the user to ensure that their password are not cached in their command line history.
- CB_REST_PASSWORD
-
Specifies the password of the user executing the command. This environment variable allows you to specify a default argument for the -p/--password argument on the command line.
COUCHBASE-CLI
Part of the couchbase-cli suite