Deleting LDAP Record


You want to delete a LDAP entry.



In this example, we just use ldapdelete from the command line.

Remember to take a backup. ldapsearch with -L



Here is an example of deleting a record in LDAP:

ldapdelete -v -D'cn=Manager..' -w ${passwd}
-h ${host} -p ${port}<<EOT

Effectively – you just need to supply the full DN. Also be aware you need to delete the lowest branch first, for example:


You need to delete sales first, then uid.



[tags]ldapdelete, LDAP Training School[/tags]


If you have found my website useful, please consider buying me a coffee below 😉

Leave a Reply

Your email address will not be published. Required fields are marked *