8815 mega_sas: variable set but not used
[unleashed.git] / usr / src / man / man1 / ldapmodrdn.1
blob5feb1bbc519dd07e05de64ed656bc7abfffd9be0
1 '\" te
2 .\" Portions Copyright (C) 2002, Sun Microsystems, Inc. All Rights Reserved
3 .\" 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.
4 .\" 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.
5 .\" 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]
6 .TH LDAPMODRDN 1 "Jan 15, 2004"
7 .SH NAME
8 ldapmodrdn \- ldap modify entry RDN tool
9 .SH SYNOPSIS
10 .LP
11 .nf
12 \fBldapmodrdn\fR [\fB-r\fR] [\fB-n\fR] [\fB-v\fR] [\fB-c\fR] [\fB-E\fR] [\fB-H\fR] [\fB-?\fR] [\fB-M\fR] [\fB-R\fR]
13      [\fB-Z\fR] [\fB-V\fR \fIversion\fR] [\fB-d\fR \fIdebuglevel\fR] [\fB-D\fR \fIbindDN\fR]
14      [\fB-w\fR \fIpasswd\fR] [\fB-h\fR \fIldaphost\fR] [\fB-i\fR \fIlocale\fR] [\fB-j\fR \fIfilename\fR]
15      [\fB-J\fR [:\fIcriticality\fR]] [\fB-k\fR \fIpath\fR] [\fB-N\fR \fIcertificate\fR]
16      [\fB-O\fR \fIhopLimit\fR] [\fB-P\fR \fIpath\fR] [\fB-W\fR \fIpassword\fR] [\fB-p\fR \fIldapport\fR]
17      [\fB-o\fR \fIattributename\fR=\fIvalue\fR] [\fB-f\fR \fIfile\fR] [\fB-Y\fR \fIproxyDN\fR]
18      [\fIdn\fR \fIrdn\fR]
19 .fi
21 .SH DESCRIPTION
22 .sp
23 .LP
24 \fBldapmodrdn\fR opens a connection to an LDAP server, binds, and modifies the
25 RDN of entries. The entry information is read from standard input, from
26 \fBfile\fR through the use of the \fB-f\fR option, or from the command-line
27 pair \fIdn\fR and \fIrdn\fR.
28 .SH OPTIONS
29 .sp
30 .ne 2
31 .na
32 \fB\fB-c\fR\fR
33 .ad
34 .sp .6
35 .RS 4n
36 Continuous operation mode. Errors are reported, but ldapmodify continues with
37 modifications. The default is to exit after reporting an error.
38 .RE
40 .sp
41 .ne 2
42 .na
43 \fB\fB-D\fR\fI bindDN\fR\fR
44 .ad
45 .sp .6
46 .RS 4n
47 Use the distinguished name \fIbinddn\fR to bind to the directory.
48 .RE
50 .sp
51 .ne 2
52 .na
53 \fB\fB-d\fR\fI debuglevel\fR\fR
54 .ad
55 .sp .6
56 .RS 4n
57 Set the LDAP debugging level. Useful values of \fIdebuglevel\fR for
58 \fBldapmodrdn\fR are:
59 .sp
60 .ne 2
61 .na
62 \fB\fB1\fR \fR
63 .ad
64 .RS 8n
65 Trace
66 .RE
68 .sp
69 .ne 2
70 .na
71 \fB\fB2\fR \fR
72 .ad
73 .RS 8n
74 Packets
75 .RE
77 .sp
78 .ne 2
79 .na
80 \fB\fB4\fR \fR
81 .ad
82 .RS 8n
83 Arguments
84 .RE
86 .sp
87 .ne 2
88 .na
89 \fB\fB32\fR \fR
90 .ad
91 .RS 8n
92 Filters
93 .RE
95 .sp
96 .ne 2
97 .na
98 \fB\fB128\fR \fR
99 .ad
100 .RS 8n
101 Access control
104 To request more than one category of debugging information, add the masks. For
105 example, to request trace and filter information, specify a \fIdebuglevel\fR of
110 .ne 2
112 \fB\fB-E\fR\fR
114 .sp .6
115 .RS 4n
116 Ask server to expose (report) bind identity by means of authentication response
117 control.
121 .ne 2
123 \fB\fB-f\fR\fI file\fR\fR
125 .sp .6
126 .RS 4n
127 Read the entry modification information from \fBfile\fR instead of from
128 standard input or the command-line.
132 .ne 2
134 \fB\fB-?\fR\fR
136 .sp .6
137 .RS 4n
138 Display the usage help text that briefly describes all options.
142 .ne 2
144 \fB\fB-H\fR\fR
146 .sp .6
147 .RS 4n
148 Display the usage help text that briefly describes all options.
152 .ne 2
154 \fB\fB-h\fR \fI ldaphost\fR\fR
156 .sp .6
157 .RS 4n
158 Specify an alternate host on which the LDAP server is running.
162 .ne 2
164 \fB\fB-i\fR \fIlocale\fR\fR
166 .sp .6
167 .RS 4n
168 Specify the character set to use for the \fB-f\fR \fILDIFfile\fR or standard
169 input. The default is the character set specified in the \fBLANG\fR environment
170 variable. You might choose to use this option to perform the conversion from
171 the specified character set to UTF8, thus overriding the \fBLANG\fR setting.
175 .ne 2
177 \fB\fB-J\fR [:\fIcriticality\fR[:\fIvalue\fR|::\fIb64value\fR|\fIb64value\fR|:\fIfileurl\fR]]\fR
179 .sp .6
180 .RS 4n
181 Criticality is a boolean value (default is \fBfalse\fR).
185 .ne 2
187 \fB\fB-j\fR \fIfilename\fR\fR
189 .sp .6
190 .RS 4n
191 Specify a file containing the password for the bind DN or the password for the
192 SSL client's key database. To protect the password, use this option in scripts
193 and place the password in a secure file. This option is mutually exclusive of
194 the \fB-w\fR and \fB-W\fR options.
198 .ne 2
200 \fB\fB-k\fR \fIpath\fR\fR
202 .sp .6
203 .RS 4n
204 Specify the path to a directory containing conversion routines. These routines
205 are used if you want to specify a locale that is not supported by default by
206 your directory server. This is for NLS support.
210 .ne 2
212 \fB\fB-M\fR\fR
214 .sp .6
215 .RS 4n
216 Manage smart referrals. When they are the target of the operation, modify the
217 entry containing the referral instead of the entry obtained by following the
218 referral.
222 .ne 2
224 \fB\fB-n\fR \fR
226 .sp .6
227 .RS 4n
228 Previews modifications, but makes no changes to entries. Useful in conjunction
229 with \fB-v\fR and \fB-d\fR for debugging.
233 .ne 2
235 \fB\fB-N\fR \fIcertificate\fR\fR
237 .sp .6
238 .RS 4n
239 Specify the certificate name to use for certificate-based client
240 authentication. For example: \fB-N\fR \fB"Directory-Cert"\fR.
244 .ne 2
246 \fB\fB-n\fR\fR
248 .sp .6
249 .RS 4n
250 Show what would be done, but do not actually change entries. Useful in
251 conjunction with \fB-v\fR for debugging.
255 .ne 2
257 \fB\fB-o\fR \fIattributename\fR=\fIvalue\fR\fR
259 .sp .6
260 .RS 4n
261 For SASL mechanisms and other options such as security properties, mode of
262 operation, authorization ID, authentication ID, and so forth.
264 The different attribute names and their values are as follows:
266 .ne 2
268 \fB\fBsecProp\fR=\fI"number"\fR\fR
270 .RS 20n
271 For defining SASL security properties.
275 .ne 2
277 \fB\fBrealm\fR=\fI"value"\fR\fR
279 .RS 20n
280 Specifies SASL realm (default is \fBrealm=none\fR).
284 .ne 2
286 \fB\fBauthzid\fR=\fI"value"\fR\fR
288 .RS 20n
289 Specify the authorization ID name for SASL bind.
293 .ne 2
295 \fB\fBauthid\fR=\fI"value"\fR\fR
297 .RS 20n
298 Specify the authentication ID for SASL bind.
302 .ne 2
304 \fB\fBmech\fR=\fI"value"\fR\fR
306 .RS 20n
307 Specifies the various SASL mechanisms.
313 .ne 2
315 \fB\fB-O\fR \fIhopLimit\fR\fR
317 .sp .6
318 .RS 4n
319 Specify the maximum number of referral hops to follow while finding an entry to
320 modify. By default, there is no limit.
324 .ne 2
326 \fB\fB-P\fR \fIpath\fR\fR
328 .sp .6
329 .RS 4n
330 Specify the path and filename of the client's certificate database. For
331 example:
333 .in +2
335 -P /home/uid/.netscape/cert7.db
337 .in -2
339 When using the command on the same host as the directory server, you can use
340 the server's own certificate database. For example:
342 .in +2
344 -P \fIinstallDir\fR/lapd-serverID/alias/cert7.db
346 .in -2
348 Use the \fB-P\fR option alone to specify server authentication only.
352 .ne 2
354 \fB\fB-p\fR\fI ldapport\fR\fR
356 .sp .6
357 .RS 4n
358 Specify an alternate TCP port where the secure LAPD server is listening.
362 .ne 2
364 \fB\fB-R\fR\fR
366 .sp .6
367 .RS 4n
368 Do not automatically follow referrals returned while searching.
372 .ne 2
374 \fB\fB-r\fR\fR
376 .sp .6
377 .RS 4n
378 Remove old RDN values from the entry. By default, old values are kept.
382 .ne 2
384 \fB\fB-V\fR \fIversion\fR\fR
386 .sp .6
387 .RS 4n
388 Specify the LDAP protocol version number to be used for the delete operation,
389 either 2 or 3. LDAP v3 is the default. Specify LDAP v2 when connecting to
390 servers that do not support v3.
394 .ne 2
396 \fB\fB-v\fR\fR
398 .sp .6
399 .RS 4n
400 Use verbose mode, with diagnostics written to standard output.
404 .ne 2
406 \fB\fB-W\fR \fIpassword\fR\fR
408 .sp .6
409 .RS 4n
410 Specify the password for the client's key database given in the \fB-P\fR
411 option. This option is required for certificate-based client authentication.
412 Specifying \fIpassword\fR on the command line has security issues because the
413 password can be seen by others on the system by means of the \fBps\fR command.
414 Use the \fB-j\fR instead to specify the password from the file. This option is
415 mutually exclusive of \fB-j\fR.
419 .ne 2
421 \fB\fB-w\fR\fI passwd\fR\fR
423 .sp .6
424 .RS 4n
425 Use \fIpasswd\fR as the password for authentication to the directory. When you
426 use \fB-w\fR\fI passwd\fR to specify the password to be used for
427 authentication, the password is visible to other users of the system by means
428 of the \fBps\fR command, in script files or in shell history. If you use the
429 \fBldapmodrdn\fR command without this option, the command will prompt for the
430 password and read it from standard in. When used without the \fB-w\fR option,
431 the password will not be visible to other users.
435 .ne 2
437 \fB\fB-Y\fR \fIproxyid\fR\fR
439 .sp .6
440 .RS 4n
441 Specify the proxy DN (proxied authorization id) to use for the modify
442 operation, usually in double quotes ("") for the shell.
446 .ne 2
448 \fB\fB-Z\fR\fR
450 .sp .6
451 .RS 4n
452 Specify that SSL be used to provide certificate-based client authentication.
453 This option requires the \fB-N\fR and SSL password and any other of the SSL
454 options needed to identify the certificate and the key database.
457 .SS "Input Format"
460 If the command-line arguments \fIdn\fR and \fIrdn\fR are given, \fIrdn\fR
461 replaces the RDN of the entry specified by the DN, \fIdn\fR.
464 Otherwise, the contents of \fBfile\fR (or standard input if the \fB-\fR \fBf\fR
465 option is not specified) must consist of one or more pair of lines:
467 .in +2
469     Distinguished Name (DN)
470     Relative Distinguished Name (RDN)
472 .in -2
477 Use one or more blank lines to separate each DN/RDN pair.
478 .SH EXAMPLES
481 The file \fB/tmp/entrymods\fR contains:
483 .in +2
485 cn=Modify Me, o=XYZ, c=US
486 cn=The New Me
488 .in -2
493 The command:
495 .in +2
497 example% ldapmodify -r -f /tmp/entrymods
499 .in -2
504 changes the RDN of the "Modify Me" entry from "Modify Me" to "The New Me" and
505 the old cn, "Modify Me" is removed.
506 .SH ATTRIBUTES
509 See \fBattributes\fR(5) for a description of the following attributes:
514 box;
515 c | c
516 l | l .
517 ATTRIBUTE TYPE  ATTRIBUTE VALUE
518 Stability Level Evolving
521 .SH SEE ALSO
524 \fBldapadd\fR(1), \fBldapdelete\fR(1), \fBldapmodify\fR(1),
525 \fBldapsearch\fR(1), \fBattributes\fR(5)
526 .SH DIAGNOSTICS
529 Exit status is \fB0\fR if no errors occur. Errors result in a non-zero exit
530 status and a diagnostic message being written to standard error.