Set the Lightweight Directory Access Protocol (LDAP) settings.


The basic syntax is:

couchbase-cli setting-ldap -c [host]:8091 -u [admin] -p [password]
Note: LDAP cannot be used for the bucket authentication.


Use this command to set various options for LDAP.

Warning: The setting-ldap command is deprecated and will be removed in a future release. Please use admin-role-manage instead.


The following are the command options:

Table 1. setting-ldap options
Options Description
--ldap-admins= Setting up full LDAP administrators, comma-separated.
--ldap-roadmins= Setting up a read-only LDAP administrators, comma-separated.
--ldap-enabled=[0|1] Enables the LDAP protocol for authentication (yes=1, no=0).
--ldap-default=[admin | roadmins | none] Sets the default LDAP accounts.


Set the full LDAP administrator AdminLDAP and enable the LDAP protocol for authentication:

couchbase-cli setting-ldap -c -u Administrator -p password \
--ldap-admins AdmninLDAP --ldap-enabled 1


Unless you are running Couchbase Server Enterprise Edition on Linux that supports LDAP authentication, you will get an error message:
ERROR: unable to set LDAP auth settings (400) Bad Request
       This http API endpoint is only supported in enterprise edition running on GNU/Linux