It 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 a string-represented DN as defined in RFC 1779. If no dn arguments are provided, a list of DNs is read from standard input (or from file if the -f option is used).
binddn should be a string-represented DN, as defined in RFC 1779 or its successor.
If a -D binddn option is not supplied, the command will take the binddn value from the LDAP_BINDDN_CHANGE environmental variable, if set. If LDAP_BINDDN_CHANGE specifies a null string, it is assumed that an anonymous bind is required.
If a -D option is not supplied, and LDAP_BINDDN_CHANGE is not used to specify the bind DN, the configuration file /etc/ldap/ldap_defaults will be examined for a default value to be used. If no default is supplied, a value of "" will be assumed.
The password is prompted for in a non-echoing input mode. If ldapdelete has no controlling terminal, the password will be read from standard input.
The server can be specified either as a hostname or as a dotted string giving an IP address.
A server port may be specified along with the server name or addresse by using the notation servername:portnumber or serverIPaddr:portnumber. If a port number is not explicitly specified for the particular server, a default port (as described for the -p option) is used.
If a null string is supplied, the local host is assumed. See the -p option for how the local port is selected.
If no -h option is supplied, the command will take the ldaphost value from the LDAP_HOST environmental variable, if this is present.
If no -h option is supplied, and LDAP_HOST is not set, then the configuration file /etc/ldap/ldap_defaults will be examined for a default value to be used.
If no default is supplied, a value of "", implying the local host, will be assumed.
If no port number is explicitly supplied, the default LDAP port, 389, is assumed.
It is usually necessary to supply a binddn and passwd for deletion to be allowed (see the -D and -w or -W options).
Kille, S., A String Representation of Distinguished Names, RFC 1779, ISODE Consortium, March 1995.