meta data for this page
This is an old revision of the document!
apt-get install ldap-utils
Basic query
Check if anonymous bind was accepted by server:
$ ldapsearch -H ldap://server -x # extended LDIF # # LDAPv3 # base <dc=grinn-global,dc=com> (default) with scope subtree # filter: (objectclass=*) # requesting: ALL # # search result search: 2 result: 32 No such object # numResponses: 1
List root entries:
$ ldapsearch -H ldap://server -x -LLL -s base -b '' namingContexts dn: namingContexts: dc=example,dc=org
.ldaprc
- ~/.ldaprc
BASE dc=example,dc=org URI ldap://server BINDDN cn=admin,dc=example,dc=org
and verify if it works. Following command will ask for password for user “cn=admin”
ldapsearch -x -W
SASL
$ ldapsearch -x -LLL -s base -b "" supportedSASLMechanisms dn: supportedSASLMechanisms: SCRAM-SHA-1 supportedSASLMechanisms: GS2-IAKERB supportedSASLMechanisms: GS2-KRB5 supportedSASLMechanisms: GSSAPI supportedSASLMechanisms: GSS-SPNEGO supportedSASLMechanisms: DIGEST-MD5 supportedSASLMechanisms: OTP supportedSASLMechanisms: CRAM-MD5 supportedSASLMechanisms: NTLM
<code bash> ldapsearch -x -W -D 'cn=admin,dc=example,dc=org' ldapsearch -x -W -D 'uid=nextcloudsystemuser,ou=it,dc=grinn-global,dc=com' </codE>