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