cbreset_password tool

cbreset_password tool

The cbreset_password tool is used to reset an administrative or user read-only password.

Description

This tool is found in the following locations, depending upon your platform:

Operating System Location
Linux /opt/couchbase/bin/
Windows C:\Program Files\Couchbase\Server\bin\
Mac OS X /Applications/Couchbase Server.app/Contents/Resources/couchbase-core/bin/

Syntax

To reset the administrative password:

cbreset_password [hostname]:[port]

This results in output as follows:

Please enter the new administrative password (or <Enter> for system generated password):

Enter a password of six characters or more or accept the system generated password. After entering a password or accepting a generated one, the system prompts for confirmation:

Running this command will reset administrative password.
Do you really want to do it? (yes/no)yes

Example

The following example resets the password and shows a successful response.


# cbreset_password 10.5.2.117:8091

Please enter the new administrative password (or <Enter> for system generated password):

Running this command will reset administrative password.
Do you really want to do it? (yes/no)yes
Resetting administrative password...
Password for user Administrator was successfully replaced.
			

Response

The following example response shows a system generated password.

Resetting administrative password...
Password for user Administrator was successfully replaced. New password is Uxye76FJ

Response errors

There are a few possible errors from this command:

{error,<<"The password must be at least six characters.">>}

{error,<<"Failed to reset administrative password. Node is not initialized.">>}

The first error message indicates that the password wasn't long enough. The second error message indicates that Couchbase Server is not yet configured and running.