Deleting LDAP Record

[problem]

You want to delete a LDAP entry.

[/problem]

[solution]

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

Remember to take a backup. ldapsearch with -L

[/solution]

[example]

Here is an example of deleting a record in LDAP:


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

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

uid=….
sales=…,uid=….

You need to delete sales first, then uid.

[/example]

[reference]

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

[/reference]

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 *