Move everything from /var/adm to /var/log
[unleashed.git] / share / man / man1 / ldapdelete.1
blob58e899aa9a1ff7c1d5fb43692bd4dd33930384cf
1 '\" te
2 .\" Copyright (C) 1990, Regents of the University of Michigan.  All Rights Reserved.
3 .\" Portions Copyright (C) 2004, Sun Microsystems, Inc. All Rights Reserved.
4 .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License").  You may not use this file except in compliance with the License.
5 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.  See the License for the specific language governing permissions and limitations under the License.
6 .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE.  If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
7 .TH LDAPDELETE 1 "Jan 15, 2004"
8 .SH NAME
9 ldapdelete \- ldap delete entry tool
10 .SH SYNOPSIS
11 .LP
12 .nf
13 \fBldapdelete\fR [\fB-n\fR] [\fB-v\fR] [\fB-c\fR] [\fB-d\fR \fIdebuglevel\fR] [\fB-f\fR \fIfile\fR]
14      [\fB-D\fR \fIbindDN\fR] [\fB-w\fR \fIpasswd\fR | \fB-j\fR \fIfile\fR] [\fB-J\fR [:\fIcriticality\fR]]
15      [\fB-?\fR] [\fB-H\fR] [\fB-h\fR \fIldaphost\fR] [\fB-V\fR \fIversion\fR] [\fB-i\fR \fIlocale\fR]
16      [\fB-k\fR \fIpath\fR] [\fB-P\fR \fIpath\fR] [\fB-N\fR \fIcertificate\fR] [\fB-y\fR \fIproxyid\fR]
17      [\fB-p\fR \fIldapport\fR] [\fB-O\fR \fIhoplimit\fR] [\fB-o\fR \fIattributename\fR=\fIvalue\fR]
18      [\fB-W\fR \fIpassword\fR] [\fIdn\fR]...
19 .fi
21 .SH DESCRIPTION
22 .sp
23 .LP
24 The \fBldapdelete\fR utility opens a connection to an \fBLDAP\fR server, then
25 binds and deletes one or more entries. If one or more \fIdn\fR arguments are
26 provided, entries with those distinguished names are deleted. If no \fIdn\fR
27 arguments are provided, a list of \fBDN\fRs is read from \fIfile\fR, if the
28 \fB-f\fR option is specified, or from standard input.
29 .SH OPTIONS
30 .sp
31 .LP
32 The following options are supported:
33 .sp
34 .ne 2
35 .na
36 \fB\fB-a\fR\fR
37 .ad
38 .sp .6
39 .RS 4n
40 Bypass confirmation question when deleting a branch.
41 .RE
43 .sp
44 .ne 2
45 .na
46 \fB\fB-c\fR\fR
47 .ad
48 .sp .6
49 .RS 4n
50 Continuous operation mode. Errors are reported, but \fBldapdelete\fR will
51 continue with deletions. The default is to exit after reporting an error.
52 .RE
54 .sp
55 .ne 2
56 .na
57 \fB\fB-d\fR \fIdebuglevel\fR \fR
58 .ad
59 .sp .6
60 .RS 4n
61 Sets the \fBLDAP\fR debugging level. Useful levels of debugging for
62 \fBldapdelete\fR are:
63 .sp
64 .ne 2
65 .na
66 \fB\fB1\fR\fR
67 .ad
68 .RS 7n
69 Trace
70 .RE
72 .sp
73 .ne 2
74 .na
75 \fB\fB2\fR\fR
76 .ad
77 .RS 7n
78 Packets
79 .RE
81 .sp
82 .ne 2
83 .na
84 \fB\fB4\fR\fR
85 .ad
86 .RS 7n
87 Arguments
88 .RE
90 .sp
91 .ne 2
92 .na
93 \fB\fB32\fR\fR
94 .ad
95 .RS 7n
96 Filters
97 .RE
99 .sp
100 .ne 2
102 \fB\fB128\fR\fR
104 .RS 7n
105 Access control
108 To request more than one category of debugging information, add the masks. For
109 example, to request trace and filter information, specify a \fIdebuglevel\fR of
110 \fB33\fR.
114 .ne 2
116 \fB\fB-D\fR \fIbindDN\fR\fR
118 .sp .6
119 .RS 4n
120 Uses the distinguished name \fIbindDN\fR to bind to the directory.
124 .ne 2
126 \fB\fB-E\fR\fR
128 .sp .6
129 .RS 4n
130 Ask server to expose (report) bind identity by means of authentication response
131 control.
135 .ne 2
137 \fB\fB-f\fR \fIfile\fR\fR
139 .sp .6
140 .RS 4n
141 Reads the entry deletion information from \fIfile\fR instead of from standard
142 input.
146 .ne 2
148 \fB\fB-?\fR\fR
150 .sp .6
151 .RS 4n
152 Display the usage help text that briefly describes all options.
156 .ne 2
158 \fB\fB-H\fR\fR
160 .sp .6
161 .RS 4n
162 Display the usage help text that briefly describes all options.
166 .ne 2
168 \fB\fB-h\fR \fIldaphost\fR\fR
170 .sp .6
171 .RS 4n
172 Specifies an alternate host on which the LDAP server is running.
176 .ne 2
178 \fB\fB-i\fR \fIlocale\fR\fR
180 .sp .6
181 .RS 4n
182 Specify the character set to use for command-line input. The default is the
183 character set specified in the \fBLANG\fR environment variable. You might want
184 to use this option to perform the conversion from the specified character set
185 to UTF8, thus overriding the \fBLANG\fR setting.
187 Using this argument, you can input the bind DN and the target DNs in the
188 specified character set. The \fBldapdelete\fR tool converts the input from
189 these arguments before it processes the search request. For example, \fB-i\fR
190 \fBno\fR indicates that the bind DN and target DNs are provided in Norwegian.
192 This option affects only the command-line input. That is, if you specify a file
193 containing DNs (with the \fB-f\fR option), \fBldapdelete\fR will not convert
194 the data in the file.
198 .ne 2
200 \fB\fB-j\fR \fIfilename\fR\fR
202 .sp .6
203 .RS 4n
204 Specify a file containing the password for the bind DN or the password for the
205 SSL client's key database. To protect the password, use this option in scripts
206 and place the password in a secure file. This option is mutually exclusive of
207 the \fB-w\fR and \fB-W\fR options. The \fB-j\fR option is the more secure
208 alternative between \fB-j\fR and \fB-w\fR/\fB-W\fR.
212 .ne 2
214 \fB\fB-J\fR [:\fIcriticality\fR[:\fIvalue\fR|::\fIb64value\fR|\fIb64value\fR|:\fIfileurl\fR]]\fR
216 .sp .6
217 .RS 4n
218 Criticality is a boolean value (default is \fBfalse\fR).
222 .ne 2
224 \fB\fB-k\fR \fIpath\fR\fR
226 .sp .6
227 .RS 4n
228 Specify the path to a directory containing conversion routines. These routines
229 are used if you want to specify a locale that is not supported by default by
230 your directory server. This is for NLS support.
234 .ne 2
236 \fB\fB-M\fR\fR
238 .sp .6
239 .RS 4n
240 Manage smart referrals. When they are the target of the operation, delete the
241 actual entry containing the referral instead of the entry obtained by following
242 the referral.
246 .ne 2
248 \fB\fB-n\fR\fR
250 .sp .6
251 .RS 4n
252 Shows what would be done, but does not actually delete entries. Useful in
253 conjunction with options \fB-v\fR and \fB-d\fR for debugging.
257 .ne 2
259 \fB\fB-N\fR \fIcertificate\fR\fR
261 .sp .6
262 .RS 4n
263 Specify the certificate name to use for certificate-based client
264 authentication. For example: \fB-N\fR \fB"Directory-Cert"\fR.
268 .ne 2
270 \fB\fB-o\fR \fIattributename\fR=\fIvalue\fR\fR
272 .sp .6
273 .RS 4n
274 For SASL mechanisms and other options such as security properties, mode of
275 operation, authorization ID, authentication ID, and so forth.
277 The different attribute names and their values are as follows:
279 .ne 2
281 \fB\fBsecProp\fR=\fI"number"\fR\fR
283 .RS 20n
284 For defining SASL security properties.
288 .ne 2
290 \fB\fBrealm\fR=\fI"value"\fR\fR
292 .RS 20n
293 Specifies SASL realm (default is \fBrealm=none\fR).
297 .ne 2
299 \fB\fBauthzid\fR=\fI"value"\fR\fR
301 .RS 20n
302 Specify the authorization ID name for SASL bind.
306 .ne 2
308 \fB\fBauthid\fR=\fI"value"\fR\fR
310 .RS 20n
311 Specify the authentication ID for SASL bind.
315 .ne 2
317 \fB\fBmech\fR=\fI"value"\fR\fR
319 .RS 20n
320 Specifies the various SASL mechanisms.
326 .ne 2
328 \fB\fB-O\fR \fIhopLimit\fR\fR
330 .sp .6
331 .RS 4n
332 Specify the maximum number of referral hops to follow while finding an entry to
333 delete. By default, there is no limit.
337 .ne 2
339 \fB\fB-p\fR \fIldapport\fR\fR
341 .sp .6
342 .RS 4n
343 Specifies an alternate \fBTCP\fR port where the LDAP server is listening.
347 .ne 2
349 \fB\fB-P\fR \fIpath\fR\fR
351 .sp .6
352 .RS 4n
353 Specify the path and filename of the client's certificate database. For
354 example:
356 .in +2
358 -P /home/uid/.netscape/cert7.db
360 .in -2
362 When using the command on the same host as the directory server, you can use
363 the server's own certificate database. For example:
365 .in +2
367 -P \fIinstallDir\fR/lapd-serverID/alias/cert7.db
369 .in -2
371 Use the \fB-P\fR option alone to specify server authentication only.
375 .ne 2
377 \fB\fB-v\fR\fR
379 .sp .6
380 .RS 4n
381 Uses verbose mode, with diagnostics written to standard output.
385 .ne 2
387 \fB\fB-V\fR \fIversion\fR\fR
389 .sp .6
390 .RS 4n
391 Specify the LDAP protocol version number to be used for the delete operation,
392 either 2 or 3. LDAP v3 is the default. Specify LDAP v2 when connecting to
393 servers that do not support v3.
397 .ne 2
399 \fB\fB-W\fR \fIpassword\fR\fR
401 .sp .6
402 .RS 4n
403 Specify the password for the client's key database given in the \fB-P\fR
404 option. This option is required for certificate-based client authentication.
405 Specifying \fIpassword\fR on the command line has security issues because the
406 password can be seen by others on the system by means of the \fBps\fR command.
407 Use the \fB-j\fR instead to specify the password from the file. This option is
408 mutually exclusive of \fB-j\fR.
412 .ne 2
414 \fB\fB-w\fR \fIpasswd\fR\fR
416 .sp .6
417 .RS 4n
418 Use \fIpasswd\fR as the password for authentication to the directory. When you
419 use \fB-w\fR\fI passwd\fR to specify the password to be used for
420 authentication, the password is visible to other users of the system by means
421 of the \fBps\fR command, in script files or in shell history. If you use the
422 \fBldapdelete\fR command without this option, the command will prompt for the
423 password and read it from standard in. When used without the \fB-w\fR option,
424 the password will not be visible to other users.
428 .ne 2
430 \fB\fB-Y\fR \fIproxyid\fR\fR
432 .sp .6
433 .RS 4n
434 Specify the proxy DN (proxied authorization id) to use for the delete
435 operation, usually in double quotes ("") for the shell.
439 .ne 2
441 \fB\fB-Z\fR\fR
443 .sp .6
444 .RS 4n
445 Specify that SSL be used to provide certificate-based client authentication.
446 This option requires the \fB-N\fR and SSL password and any other of the SSL
447 options needed to identify the certificate and the key database.
450 .SH OPERANDS
453 The following operand is supported:
455 .ne 2
457 \fB\fIdn\fR\fR
459 .RS 6n
460 Specifies one or several distinguished names of entries to delete.
463 .SH EXAMPLES
465 \fBExample 1 \fRDeleting an Entry
468 To delete the entry named with commonName \fBDelete Me\fR directly below the
469 \fBXYZ\fR Corporation organizational entry, use the following command:
472 .in +2
474 example% \fBldapdelete -D "cn=Administrator, o=XYZ, c=US" \e
475   "cn=Delete Me, o=XYZ, c=US"\fR
477 .in -2
481 \fBExample 2 \fRDeleting an Entry Using SASL Authentication
484 To delete the entry named with \fBcommonName\fR "Delete Me" directly below the
485 XYZ Corporation organizational entry, use the following command:
488 .in +2
490 example% \fBldapdelete -o mech=DIGEST-MD5 -o secProp=noanonymous \e
491 -o realm=none -o authid="dn:uid=foo,o=XYZ, c=US"  \e
492 "cn=Delete Me, o=XYZ, c=US"\fR
494 .in -2
497 .SH ATTRIBUTES
500 See \fBattributes\fR(5) for a description of the following attributes:
505 box;
506 c | c
507 l | l .
508 ATTRIBUTE TYPE  ATTRIBUTE VALUE
509 Stability Level Evolving
512 .SH EXIT STATUS
515 The following exit values are returned:
517 .ne 2
519 \fB\fB0\fR \fR
521 .RS 13n
522 Successful completion.
526 .ne 2
528 \fBNon-zero \fR
530 .RS 13n
531 An error occurred. A diagnostic message is written to standard error.
534 .SH SEE ALSO
537 \fBldapadd\fR(1), \fBldapmodify\fR(1), \fBldapmodrdn\fR(1),
538 \fBldapsearch\fR(1), \fBldap_get_option\fR(3LDAP),
539 \fBldap_set_option\fR(3LDAP), \fBattributes\fR(5)
540 .SH NOTES
543 The \fB-M\fR \fIauthentication\fR option is obsolete.