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