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