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