Deleting entries using ldapdelete
You can delete an entry using the ldapdelete tool.
|
Ensure that there are no child entries below the entry because that can create an orphaned entry. |
Back up your system before removing any entries.
Deleting an entry using ldapdelete
Steps
-
To delete an entry, run the
ldapdeletecommand.Example:
The following example deletes the
uid=user.14entry.$ bin/ldapdelete uid=user.14,ou=People,dc=example,dc=com
Deleting multiple entries using an LDIF file
About this task
To generate a file of distinguished names (DNs) to delete from the PingDirectory server:
Steps
-
To search for all entries in a branch and return the DNs of the subentries, run the following command.
Example:
For this example, the search is for all entries in the
ou=Accountingbranch.$ bin/dump-dns -D "cn=admin,dc=example,dc=com" -w password --baseDN \ "ou=Accounting,ou=People,dc=example,dc=com" --outputFile /usr/local/entry_dns.txt -
Run the
ldapdeletecommand with the file to delete the entries.Example:
The following command uses the
--continueOnErroroption, which continues deleting through the whole list even if an error is encountered for a DN entry.$ bin/ldapdelete --filename /usr/local/entry_dns.txt --continueOnError