Topic 6

Date: 3/26/2014
Lightweight Directory Access Protocol (LDAP)
Practical guide to Linux systems administration


Frequently used OpenLDAP commands

  • ldapadd (Used to add new ldap entries):
    ldapadd -x -D 'cn=Manager,dc=example,dc=com' -W  -f /tmp/user.ldif
    

  • ldapmodify (Used to add or modify ldap entries):
    ldapmodify -x -D 'cn=Manager,dc=example,dc=com' -W  -f /tmp/user.ldif 
    

  • ldapdelete is used to delete entries:
    ldapdelete -x -D 'cn=Manager,dc=example,dc=com' -W 'cn=user,ou=IT,dc=example,dc=com'
    
    or
    ldapdelete -x -D 'cn=Manager,dc=example,dc=com' -W -f /tmp/user.ldif 
    

  • ldapsearch used to search ldap servers
    ldapsearch -x -LL -b 'dc=example,dc=com' 'objectclass=posixAccount'
    
    ldapsearch -x -LL -b 'dc=example,dc=com' 'cn=Rick Francis'
    



  • Take me to the Course Website