]> git.sur5r.net Git - openldap/blob - doc/man/man1/ldapdelete.1
394d35275bcd9daf33ceeb518f04da8008e02178
[openldap] / doc / man / man1 / ldapdelete.1
1 .TH LDAPDELETE 1 "RELEASEDATE" "OpenLDAP LDVERSION"
2 .\" $OpenLDAP$
3 .\" Copyright 1998-2018 The OpenLDAP Foundation All Rights Reserved.
4 .\" Copying restrictions apply.  See COPYRIGHT/LICENSE.
5 .SH NAME
6 ldapdelete \- LDAP delete entry tool
7 .SH SYNOPSIS
8 .B ldapdelete
9 [\c
10 .BR \-V [ V ]]
11 [\c
12 .BI \-d \ debuglevel\fR]
13 [\c
14 .BR \-n ]
15 [\c
16 .BR \-v ]
17 [\c
18 .BR \-c ]
19 [\c
20 .BI \-f \ file\fR]
21 [\c
22 .BR \-r ]
23 [\c
24 .BI \-z \ sizelimit\fR]
25 [\c
26 .BR \-M [ M ]]
27 [\c
28 .BR \-x ]
29 [\c
30 .BI \-D \ binddn\fR]
31 [\c
32 .BR \-W ]
33 [\c
34 .BI \-w \ passwd\fR]
35 [\c
36 .BI \-y \ passwdfile\fR]
37 [\c
38 .BI \-H \ ldapuri\fR]
39 [\c
40 .BI \-h \ ldaphost\fR]
41 [\c
42 .BI \-p \ ldapport\fR]
43 [\c
44 .BR \-P \ { 2 \||\| 3 }]
45 [\c
46 .BR \-e \ [ ! ] \fIext\fP [ =\fIextparam\fP ]]
47 [\c
48 .BR \-E \ [ ! ] \fIext\fP [ =\fIextparam\fP ]]
49 [\c
50 .BI \-o \ opt \fR[= optparam \fR]]
51 [\c
52 .BI \-O \ security-properties\fR]
53 [\c
54 .BR \-I ]
55 [\c
56 .BR \-Q ]
57 [\c
58 .BR \-N ]
59 [\c
60 .BI \-U \ authcid\fR]
61 [\c
62 .BI \-R \ realm\fR]
63 [\c
64 .BI \-X \ authzid\fR]
65 [\c
66 .BI \-Y \ mech\fR]
67 [\c
68 .BR \-Z [ Z ]]
69 [\c
70 .IR DN \ [ ... ]]
71 .SH DESCRIPTION
72 .I ldapdelete
73 is a shell-accessible interface to the
74 .BR ldap_delete_ext (3)
75 library call.
76 .LP
77 .B ldapdelete
78 opens a connection to an LDAP server, binds, and deletes one or more
79 entries.  If one or more \fIDN\fP arguments are provided, entries with
80 those Distinguished Names are deleted.  Each \fIDN\fP should be provided
81 using the LDAPv3 string representation as defined in RFC 4514.
82 If no \fIDN\fP arguments
83 are provided, a list of DNs is read from standard input (or from
84 \fIfile\fP if the \fB\-f\fP flag is used).
85 .SH OPTIONS
86 .TP
87 .BR \-V [ V ]
88 Print version info.
89 If \fB\-VV\fP is given, only the version information is printed.
90 .TP
91 .BI \-d \ debuglevel
92 Set the LDAP debugging level to \fIdebuglevel\fP.
93 .B ldapdelete
94 must be compiled with LDAP_DEBUG defined for this option to have any effect.
95 .TP
96 .B \-n
97 Show what would be done, but don't actually delete entries.  Useful for
98 debugging in conjunction with \fB\-v\fP.
99 .TP
100 .B \-v
101 Use verbose mode, with many diagnostics written to standard output.
102 .TP
103 .B \-c
104 Continuous operation mode.  Errors  are  reported,  but
105 .B ldapdelete
106 will  continue  with  deletions.   The default is to exit after
107 reporting an error.
108 .TP
109 .BI \-f \ file
110 Read a series of DNs from \fIfile\fP, one per line, performing an
111 LDAP delete for each.
112 .TP
113 .B \-r
114 Do a recursive delete.  If the DN specified isn't a leaf, its
115 children, and all their children are deleted down the tree.  No
116 verification is done, so if you add this switch, ldapdelete will
117 happily delete large portions of your tree.  Use with care.
118 .TP
119 .BI \-z \ sizelimit
120 Use \fIsizelimit\fP when searching for children DN to delete,
121 to circumvent any server-side size limit.  Only useful in conjunction
122 with \fB\-r\fP.
123 .TP
124 .BR \-M [ M ]
125 Enable manage DSA IT control.
126 .B \-MM
127 makes control critical.
128 .TP
129 .B \-x 
130 Use simple authentication instead of SASL.
131 .TP
132 .BI \-D \ binddn
133 Use the Distinguished Name \fIbinddn\fP to bind to the LDAP directory.
134 For SASL binds, the server is expected to ignore this value.
135 .TP
136 .B \-W
137 Prompt for simple authentication.
138 This is used instead of specifying the password on the command line.
139 .TP
140 .BI \-w \ passwd
141 Use \fIpasswd\fP as the password for simple authentication.
142 .TP
143 .BI \-y \ passwdfile
144 Use complete contents of \fIpasswdfile\fP as the password for
145 simple authentication.
146 .TP
147 .BI \-H \ ldapuri
148 Specify URI(s) referring to the ldap server(s); only the protocol/host/port
149 fields are allowed; a list of URI, separated by whitespace or commas
150 is expected.
151 .TP
152 .BI \-h \ ldaphost
153 Specify an alternate host on which the ldap server is running.
154 Deprecated in favor of \fB\-H\fP.
155 .TP
156 .BI \-p \ ldapport
157 Specify an alternate TCP port where the ldap server is listening.
158 Deprecated in favor of \fB\-H\fP.
159 .TP
160 .BR \-P \ { 2 \||\| 3 }
161 Specify the LDAP protocol version to use.
162 .TP
163 .BR \-e \ [ ! ] \fIext\fP [ =\fIextparam\fP ]
164 .TP
165 .BR \-E \ [ ! ] \fIext\fP [ =\fIextparam\fP ]
166
167 Specify general extensions with \fB\-e\fP and delete extensions with \fB\-E\fP.
168 \'\fB!\fP\' indicates criticality.
169
170 General extensions:
171 .nf
172   [!]assert=<filter>    (an RFC 4515 Filter)
173   !authzid=<authzid>    ("dn:<dn>" or "u:<user>")
174   [!]bauthzid           (RFC 3829 authzid control)
175   [!]chaining[=<resolve>[/<cont>]]
176   [!]manageDSAit
177   [!]noop
178   ppolicy
179   [!]postread[=<attrs>] (a comma-separated attribute list)
180   [!]preread[=<attrs>]  (a comma-separated attribute list)
181   [!]relax
182   sessiontracking[=<username>]
183   abandon,cancel,ignore (SIGINT sends abandon/cancel,
184   or ignores response; if critical, doesn't wait for SIGINT.
185   not really controls)
186 .fi
187
188 Delete extensions:
189 .nf
190   (none)
191 .fi
192 .TP
193 .BI \-o \ opt \fR[= optparam \fR]
194
195 Specify general options.
196
197 General options:
198 .nf
199   nettimeout=<timeout>  (in seconds, or "none" or "max")
200   ldif-wrap=<width>     (in columns, or "no" for no wrapping)
201 .fi
202 .TP
203 .BI \-O \ security-properties
204 Specify SASL security properties.
205 .TP
206 .B \-I
207 Enable SASL Interactive mode.  Always prompt.  Default is to prompt
208 only as needed.
209 .TP
210 .B \-Q
211 Enable SASL Quiet mode.  Never prompt.
212 .TP
213 .B \-N
214 Do not use reverse DNS to canonicalize SASL host name.
215 .TP
216 .BI \-U \ authcid
217 Specify the authentication ID for SASL bind. The form of the identity depends on the
218 actual SASL mechanism used.
219 .TP
220 .BI \-R \ realm
221 Specify the realm of authentication ID for SASL bind. The form of the realm
222 depends on the actual SASL mechanism used.
223 .TP
224 .BI \-X \ authzid
225 Specify the requested authorization ID for SASL bind.
226 .I authzid
227 must be one of the following formats:
228 .BI dn: "<distinguished name>"
229 or
230 .BI u: <username>
231 .TP
232 .BI \-Y \ mech
233 Specify the SASL mechanism to be used for authentication. If it's not
234 specified, the program will choose the best mechanism the server knows.
235 .TP
236 .BR \-Z [ Z ]
237 Issue StartTLS (Transport Layer Security) extended operation. If you use
238 \fB\-ZZ\fP, the command will require the operation to be successful.
239 .SH EXAMPLE
240 The following command:
241 .LP
242 .nf
243     ldapdelete "cn=Delete Me,dc=example,dc=com"
244 .fi
245 .LP
246 will attempt to delete the entry named "cn=Delete Me,dc=example,dc=com".
247 Of course it would probably be necessary to supply authentication
248 credentials.
249 .SH DIAGNOSTICS
250 Exit status is 0 if no errors occur.  Errors result in a non-zero exit
251 status and a diagnostic message being written to standard error.
252 .SH "SEE ALSO"
253 .BR ldap.conf (5),
254 .BR ldapadd (1),
255 .BR ldapmodify (1),
256 .BR ldapmodrdn (1),
257 .BR ldapsearch (1),
258 .BR ldap (3),
259 .BR ldap_delete_ext (3)
260 .SH AUTHOR
261 The OpenLDAP Project <http://www.openldap.org/>
262 .SH ACKNOWLEDGEMENTS
263 .so ../Project