LDAP commands in openldap

February 25, 2016
By admin

Overview: Frequently used commands in Ldap for example add, modify, delete, search etc.,
Details:
1. Create one Ldif file
Now add this Ldif file in [root@server ~]#
LDAP Add Command:
[root@server ~]#ldapadd -D “cn=Manager,dc=deep,dc=state,dc=ct,dc=us” -W -x -a –fAdd.ldif
Enter the Root Password:

2. Select Ldif file which you want to modify
LDAP Modify Command :
[root@server ~]#ldapmodify –D “cn=Manager,dc=deep,dc=state,dc=ct,dc=us ” -W -x -a -f Modify.ldif
Enter the Root Password:

3. LDAP Search command :
[root@server ~]#ldapsearch -x -b “dc=deep,dc=state,dc=ct,dc=us”
Enter the Root Password:

4. LDAP Delete Command:
Ldapdelete –W –D “cn=Manager,dc=deep,dc=state,dc=ct,dc=us” “cn=UserName,dc=deep,dc=state,dc=ct,dc=us”
Enter the Root Password:

Tags: , , ,

Leave a Reply