Posted By

ff1959 on 07/28/11


Tagged

ldap


Versions (?)

Extensible match filter example


 / Published in: Bash
 

Use an extensible match filter to discover entries beneath and including a portion of the DN. Uses the older OpenLDAP ldapsearch syntax and the modern ldapsearch syntax.

  1. ldapsearch --hostname localhost --port 1389 \
  2. --bindDn "cn=directory manager" --bindPassword password \
  3. --baseDn dc=example,dc=com --searchScope sub \
  4. --sizeLimit 3 '(ou:dn:caseIgnoreMatch:=people)' uid
  5.  
  6. # -=-=-=-=-=-=-=-
  7.  
  8. ldapsearch -h localhost -p 1389 \
  9. -D 'cn=directory manager' -w password \
  10. -b 'dc=example,dc=com' -s sub \
  11. -z 3 '(ou:dn:caseIgnoreMatch:=people)' uid

Report this snippet  

You need to login to post a comment.