Topic 7

Date: 3/1/2017
Lightweight Directory Access Protocol (LDAP)
Linux System 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'
    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