Change Password

      +
      A local user of Couchbase Server can change their password.

      HTTP Method and URI

      POST /controller/changePassword

      Description

      Changes the current, locally defined user-password to a new user-password.

      Curl Syntax

      curl -X POST http://<ip-address-or-domain-name>:8091/controller/changePassword
        -u <username>:<password>
        -d <new-password>

      The specified new-password must be for a locally defined user, and must conform to the currently established password policy for the cluster. The default policy is described in Password Strength. For instructions on changing the current password policy, see Set Password Policy. For information on local and external domains, see Authentication Domains.

      Responses

      Success returns 200 OK. Failure to authenticate returns 401 Unauthorized. A malformed URI returns 404 Object Not Found.

      Examples

      The following example changes the locally defined password of user localUser from localUserPassword to localUserNewPassword:

      curl -v -X POST http://localhost:8091/controller/changePassword \
      -u localUser:localUserPassword \
      -d password=localUserNewPassword

      See Also

      The default policy is described in Password Strength. For instructions on changing the current password policy, see Set Password Policy. For information on local and external domains, see Authentication Domains.