NAME

ldapdelete - LDAP delete entry tool

SYNOPSIS

ldapdelete [-n] [-v] [-c] [-M[M]] [-d debuglevel] [-f file] [-D binddn] [-W] [-w passwd] [-y passwdfile] [-H ldapuri] [-h ldaphost] [-P 2|_3] [-p ldapport] [-O security-properties] [-U authcid] [-R realm] [-r] [-x] [-I] [-Q] [-X authzid] [-Y mech] [-z sizelimit] [-Z[Z]] [dn]...

DESCRIPTION

ldapdelete is a shell-accessible interface to the ldap_delete_ext(3) library call.

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

OPTIONS

-n
Show what would be done, but don't actually delete entries. Useful for debugging in conjunction with -v.
-v
Use verbose mode, with many diagnostics written to standard output.
-c
Continuous operation mode. Errors are reported, but ldapdelete will continue with deletions. The default is to exit after reporting an error.
-M[M]
Enable manage DSA IT control. -MM makes control critical.
-d debuglevel
Set the LDAP debugging level to _d_e_b_u_g_l_e_v_e_l. ldapdelete must be compiled with LDAP_DEBUG defined for this option to have any effect.
-f file
Read a series of DNs from _f_i_l_e, one per line, performing an LDAP delete for each.
-x
Use simple authentication instead of SASL.
-D binddn
Use the Distinguished Name _b_i_n_d_d_n to bind to the LDAP directory.
-W
Prompt for simple authentication. This is used instead of specifying the password on the command line.
-w passwd
Use _p_a_s_s_w_d as the password for simple authentication.
-y passwdfile
Use complete contents of _p_a_s_s_w_d_f_i_l_e as the password for simple authentication.
-H ldapuri
Specify URI(s) referring to the ldap server(s); only the protocol/host/port fields are allowed; a list of URI, separated by whitespace or commas is expected.
-h ldaphost
Specify an alternate host on which the ldap server is running. Deprecated in favor of -H.
-p ldapport
Specify an alternate TCP port where the ldap server is listening. Deprecated in favor of -H.
_<_b_>_-_P_<_/_b_>_<_i_> _2|_3_<_/_i_> _<_d_d_> _S_p_e_c_i_f_y _t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