LDAPSEARCH(1) LDAPSEARCH(1) (NAME) ldapsearch - LDAP (SYNOPSIS) ldapsearch [-V[V]] [-d debuglevel] [-n] [-v] [-c] [-u] [-t[t]] [-T path] [-F prefix] [-A] [-L[L[L]]] [-S attribute] [-b searchbase] [-s {base|one|sub|children}] [-a {never|always|search|find}] [-l timelimit] [-z sizelimit] [-f file] [-M[M]] [-x] [-D binddn] [-W] [-w passwd] [-y passwdfile] [-H ldapuri] [-P {2|3}] [-e [!]ext[=extparam]] [-E [!]ext[=extparam]] [-o opt[=optparam]] [-O security-properties] [-I] [-Q] [-N] [-U authcid] [-R realm] [-X authzid] [-Y mech] [-Z[Z]] filter [attrs...] (DESCRIPTION) ldapsearch ldap_search_ext(3) . ldapsearch LDAP (bind) . filter RFC 4515 . (objectClass=*) . ldapsearch attrs . * . + . attrs . 1.1 . LDIF . -L . (OPTIONS) -V[V] . -VV . . -d debuglevel LDAP debuglevel. ldapsearch LDAP_DEBUG . -n . -v . -v (verbose) . -c . ldapsearch . . -f . -u (User Friendly Name) (DN) . -t[t] -t . jpegPhoto audio . -t . -T path path (: ). TMPDIR TMP TEMP (override) . -F prefix URL . file://path path -T . -A ( ). . -L LDAP ldif(5) . -L LDIFv1 . -L () . -L LDIF . LDIF . -S attribute attribute. . attribute ("") (DN) . ldap_sort(3) . ldapsearch . -S . -b searchbase searchbase . -s {base|one|sub|children} (scope) base one sub children . sub . : children (subordinate) LDAPv3 . -a {never|always|search|find} (dereferencing) . never always search find . . -l timelimit timelimit . 0 () none . max . . -z sizelimit sizelimit . 0 () none . max . . -f file file LDAP . filter %s file . % . % \25 ( RFC 4515 ). file - . ldapsearch -c . -M[M] Manage DSA IT. -MM (critical) . -x SASL. -D binddn binddn LDAP. SASL . -W . . -w passwd passwd . -y passwdfile passwdfile . -H ldapuri URI() () LDAP URI // . / DN DN () DNS SRV RFC 2782 . DN AVA "dc" ( ) RFC 2396 . -P {2|3} LDAP . -e [!]ext[=extparam] -E [!]ext[=extparam] -e -E. '!' (criticality) . : [!]assert= ( RFC 4515) !authzid= ("dn:" "u:") [!]bauthzid ( authzid RFC 3829) [!]chaining[=[/]] [!]manageDSAit [!]noop ppolicy [!]postread[=] ( ) [!]preread[=] ( ) [!]relax sessiontracking[=] abandon,cancel,ignore ( SIGINT abandon/cancel SIGINT . ) : !dontUseCopy [!]domainScope ( ) [!]mv= ( ) [!]pr=[/prompt|noprompt] ( /prompt) [!]sss=[-][/[-]...] ( ) [!]subentries[=true|false] ( ) [!]sync=ro[/] ( LDAP refreshOnly) rp[/][/] ( LDAP refreshAndPersist) [!]vlv=/(//|:) ( ) [!]deref=derefAttr:attr[,attr[...]][;derefAttr:attr[,attr[...]]] [!][=:|=::] -o opt[=optparam] ldap.conf(5) : nettimeout= ( "none" "max") ldif_wrap= ( "no" ) -O security-properties SASL. -I SASL. . . -Q SASL. . -N DNS SASL. -U authcid SASL. SASL . -R realm (realm) SASL. SASL . -X authzid SASL. authzid : dn: u: -Y mech SASL . . -Z[Z] StartTLS ( ). -ZZ . (OUTPUT FORMAT) LDAP ldif(5) : version: 1 # bjensen, example, net dn: uid=bjensen,dc=example,dc=net objectClass: person objectClass: dcObject uid: bjensen cn: Barbara Jensen sn: Jensen ... -t URI . -A " " . (EXAMPLES) : ldapsearch -LLL "(sn=smith)" cn sn telephoneNumber ( ldap.conf(5)) (sn) smith . (cn) (sn) (telephoneNumber) . : dn: uid=jts,dc=example,dc=com cn: John Smith cn: John T. Smith sn: Smith sn;lang-en: Smith sn;lang-de: Schmidt telephoneNumber: 1 555 123-4567 dn: uid=sss,dc=example,dc=com cn: Steve Smith cn: Steve S. Smith sn: Smith sn;lang-en: Smith sn;lang-de: Schmidt telephoneNumber: 1 555 765-4321 : ldapsearch -LLL -u -t "(uid=xyz)" jpegPhoto audio "xyz" . DN DN jpegPhoto audio . : dn: uid=xyz,dc=example,dc=com ufn: xyz, example, com audio:< file:///tmp/ldapsearch-audio-a19924 jpegPhoto:< file:///tmp/ldapsearch-jpegPhoto-a19924 : ldapsearch -LLL -s one -b "c=US" "(o=University*)" o description c=US (o) University . (description) : dn: o=University of Alaska Fairbanks,c=US o: University of Alaska Fairbanks description: Naturally Inspiring description: leaf node only dn: o=University of Colorado at Boulder,c=US o: University of Colorado at Boulder description: No personnel information description: Institution of education and research dn: o=University of Colorado at Denver,c=US o: University of Colorado at Denver o: UCD o: CU/Denver o: CU-Denver description: Institute for Higher Learning and Research dn: o=University of Florida,c=US o: University of Florida o: UFl description: Warper of young minds ... (DIAGNOSTICS) . . (SEE ALSO) ldapadd(1) ldapdelete(1) ldapmodify(1) ldapmodrdn(1) ldap.conf(5) ldif(5) ldap(3) ldap_search_ext(3) ldap_sort(3) (AUTHORS) (ACKNOWLEDGEMENTS) OpenLDAP Software . OpenLDAP Software 3.3 LDAP . OpenLDAP 2.6.13 2026-03-09 LDAPSEARCH(1)