ldapdelete

From RaySoft

ldapdelete opens a connection to an LDAP server, binds, and deletes one or more entries. If one or more 'DN' arguments are provided, entries with those 'Distinguished Names' are deleted. Each 'DN' should be provided using the LDAPv3 string representation as defined in RFC 2253. If no dn arguments are provided, a list of 'DNs' is read from standard input (or from file if the -f flag is used).[1]

Documentation

Syntax

ldapdelete [PARAMETER ...] DN [DN ...]

Parameters

-D BINDDN
Use the 'Distinguished Name' BINDDN to bind to the LDAP directory.
-r
Do a recursive delete. If the 'DN' specified isn't a leaf, its children, and all their children are deleted down the tree. No verification is done, so if you add this switch, ldapdelete will happily delete large portions of your tree. Use with care.
-W
Prompt for simple authentication. This is used instead of specifying the password on the command line.
-x
Use simple authentication instead of SASL.
-Z[Z]
Issue StartTLS (Transport Layer Security) extended operation. If you use -ZZ, the command will require the operation to be successful.

References

  1. man 1 'ldapdelete'