1LDAPDELETE(1)               General Commands Manual              LDAPDELETE(1)
2
3
4

NAME

6       ldapdelete - LDAP delete entry tool
7

SYNOPSIS

9       ldapdelete [-n] [-v] [-c] [-M[M]] [-d debuglevel] [-f file] [-D binddn]
10       [-W] [-w passwd] [-y passwdfile] [-H ldapuri] [-h ldaphost]  [-P {2|3}]
11       [-e [!]ext[=extparam]]  [-E [!]ext[=extparam]]  [-p ldapport] [-O secu‐
12       rity-properties]  [-U authcid]   [-R realm]   [-r]   [-x]   [-I]   [-Q]
13       [-X authzid] [-Y mech] [-z sizelimit] [-Z[Z]] [DN [...]]
14

DESCRIPTION

16       ldapdelete  is  a  shell-accessible interface to the ldap_delete_ext(3)
17       library call.
18
19       ldapdelete opens a connection to an LDAP server, binds, and deletes one
20       or  more  entries.   If  one or more DN arguments are provided, entries
21       with those Distinguished Names are deleted.  Each DN should be provided
22       using  the  LDAPv3 string representation as defined in RFC 4514.  If no
23       DN arguments are provided, a list of DNs is read  from  standard  input
24       (or from file if the -f flag is used).
25

OPTIONS

27       -n     Show  what  would  be  done,  but don't actually delete entries.
28              Useful for debugging in conjunction with -v.
29
30       -v     Use verbose mode, with many diagnostics written to standard out‐
31              put.
32
33       -c     Continuous   operation   mode.    Errors   are   reported,   but
34              ldapdelete will  continue  with  deletions.   The default is  to
35              exit after reporting an error.
36
37       -M[M]  Enable manage DSA IT control.  -MM makes control critical.
38
39       -d debuglevel
40              Set  the LDAP debugging level to debuglevel.  ldapdelete must be
41              compiled with LDAP_DEBUG defined for this  option  to  have  any
42              effect.
43
44       -f file
45              Read a series of DNs from file, one per line, performing an LDAP
46              delete for each.
47
48       -x     Use simple authentication instead of SASL.
49
50       -D binddn
51              Use the Distinguished Name binddn to bind to the LDAP directory.
52              For SASL binds, the server is expected to ignore this value.
53
54       -W     Prompt for simple authentication.  This is used instead of spec‐
55              ifying the password on the command line.
56
57       -w passwd
58              Use passwd as the password for simple authentication.
59
60       -y passwdfile
61              Use complete contents of passwdfile as the password  for  simple
62              authentication.
63
64       -H ldapuri
65              Specify  URI(s) referring to the ldap server(s); only the proto‐
66              col/host/port fields are allowed; a list of  URI,  separated  by
67              whitespace or commas is expected.
68
69       -h ldaphost
70              Specify  an  alternate host on which the ldap server is running.
71              Deprecated in favor of -H.
72
73       -p ldapport
74              Specify an alternate TCP port where the ldap server  is  listen‐
75              ing.  Deprecated in favor of -H.
76
77       -P {2|3}
78              Specify the LDAP protocol version to use.
79
80       -e [!]ext[=extparam]
81
82       -E [!]ext[=extparam]
83
84              Specify  general  extensions  with -e and search extensions with
85              -E.  ´!´ indicates criticality.
86
87              General extensions:
88                [!]assert=<filter>   (an RFC 4515 Filter)
89                [!]authzid=<authzid> ("dn:<dn>" or "u:<user>")
90                [!]manageDSAit
91                [!]noop
92                ppolicy
93                [!]postread[=<attrs>]        (a comma-separated attribute list)
94                [!]preread[=<attrs>] (a comma-separated attribute list)
95                abandon, cancel (SIGINT sends abandon/cancel; not really controls)
96
97              Search extensions:
98                [!]domainScope                               (domain scope)
99                [!]mv=<filter>                               (matched values filter)
100                [!]pr=<size>[/prompt|noprompt]       (paged results/prompt)
101                [!]sss=[-]<attr[:OID]>[/[-]<attr[:OID]>...]  (server side sorting)
102                [!]subentries[=true|false]           (subentries)
103                [!]sync=ro[/<cookie>]                        (LDAP Sync refreshOnly)
104                        rp[/<cookie>][/<slimit>]     (LDAP Sync refreshAndPersist)
105
106       -r     Do a recursive delete.  If the DN specified isn't  a  leaf,  its
107              children,  and all their children are deleted down the tree.  No
108              verification is done, so if you add this switch, ldapdelete will
109              happily delete large portions of your tree.  Use with care.
110
111       -z sizelimit
112              Use  sizelimit when searching for children DN to delete, to cir‐
113              cumvent any server-side size limit.  Only useful in  conjunction
114              with -r.
115
116       -O security-properties
117              Specify SASL security properties.
118
119       -I     Enable  SASL  Interactive  mode.   Always prompt.  Default is to
120              prompt only as needed.
121
122       -Q     Enable SASL Quiet mode.  Never prompt.
123
124       -U authcid
125              Specify the authentication ID for SASL bind.  The  form  of  the
126              identity depends on the actual SASL mechanism used.
127
128       -R realm
129              Specify  the  realm of authentication ID for SASL bind. The form
130              of the realm depends on the actual SASL mechanism used.
131
132       -X authzid
133              Specify the requested authorization ID for SASL  bind.   authzid
134              must be one of the following formats: dn:<distinguished name> or
135              u:<username>
136
137       -Y mech
138              Specify the SASL mechanism to be  used  for  authentication.  If
139              it's  not  specified, the program will choose the best mechanism
140              the server knows.
141
142       -Z[Z]  Issue StartTLS (Transport Layer Security) extended operation. If
143              you  use  -ZZ, the command will require the operation to be suc‐
144              cessful.
145

EXAMPLE

147       The following command:
148
149           ldapdelete "cn=Delete Me,dc=example,dc=com"
150
151       will  attempt  to  delete  the  entry  named   "cn=Delete   Me,dc=exam‐
152       ple,dc=com".   Of  course  it  would  probably  be  necessary to supply
153       authentication credentials.
154

DIAGNOSTICS

156       Exit status is 0 if no errors occur.  Errors result in a non-zero  exit
157       status and a diagnostic message being written to standard error.
158

SEE ALSO

160       ldap.conf(5),  ldapadd(1), ldapmodify(1), ldapmodrdn(1), ldapsearch(1),
161       ldap(3), ldap_delete_ext(3)
162

AUTHOR

164       The OpenLDAP Project <http://www.openldap.org/>
165

ACKNOWLEDGEMENTS

167       OpenLDAP Software is developed and maintained by The  OpenLDAP  Project
168       <http://www.openldap.org/>.   OpenLDAP Software is derived from Univer‐
169       sity of Michigan LDAP 3.3 Release.
170
171
172
173OpenLDAP 2.4.23                   2010/06/30                     LDAPDELETE(1)
Impressum