version 4, including all changes.
.
Rev |
Author |
# |
Line |
1 |
perry |
1 |
LDAPMODIFY |
|
|
2 |
!!!LDAPMODIFY |
|
|
3 |
NAME |
|
|
4 |
SYNOPSIS |
|
|
5 |
DESCRIPTION |
|
|
6 |
OPTIONS |
|
|
7 |
INPUT FORMAT |
|
|
8 |
EXAMPLES |
|
|
9 |
DIAGNOSTICS |
|
|
10 |
SEE ALSO |
|
|
11 |
BUGS |
|
|
12 |
AUTHOR |
|
|
13 |
ACKNOWLEDGEMENTS |
|
|
14 |
---- |
|
|
15 |
!!NAME |
|
|
16 |
|
|
|
17 |
|
|
|
18 |
ldapmodify, ldapadd - LDAP modify entry and LDAP add entry tools |
|
|
19 |
!!SYNOPSIS |
|
|
20 |
|
|
|
21 |
|
|
|
22 |
__ldapmodify__ [[__-a__] [[__-c__] [[__-n__] |
|
|
23 |
[[__-v__] [[__-k__] [[__-K__] [[__-M[[M]__] |
|
|
24 |
[[__-d__ ''debuglevel''] [[__-D__ ''binddn''] |
|
|
25 |
[[__-W__] [[__-w__ ''passwd''] [[__-H__ |
|
|
26 |
''ldapuri''] [[__-h__ ''ldaphost''] [[__-p__ |
|
|
27 |
''ldapport''] [[__-P__ ''2''|''3''] [[__-O__ |
|
|
28 |
security-properties__]__ [[__-I__] [[__-Q__] |
|
|
29 |
[[__-U__ ''authcid''] [[__-x__] [[__-X__ |
|
|
30 |
''authzid''] [[__-Y__ ''mech''] [[__-Z[[Z]__] |
|
|
31 |
[[__-f__ ''file''] |
|
|
32 |
|
|
|
33 |
|
|
|
34 |
__ldapadd__ [[__-c__] [[__-n__] [[__-v__] |
|
|
35 |
[[__-k__] [[__-K__] [[__-M[[M]__] [[__-d__ |
|
|
36 |
''debuglevel''] [[__-D__ ''binddn''] [[__-W__] |
|
|
37 |
[[__-w__ ''passwd''] [[__-h__ ''ldaphost''] |
|
|
38 |
[[__-p__ ''ldapport''] [[__-P__ ''2''|''3''] |
|
|
39 |
[[__-O__ security-properties__]__ [[__-I__] |
|
|
40 |
[[__-Q__] [[__-U__ ''authcid''] [[__-x__] |
|
|
41 |
[[__-X__ ''authzid''] [[__-Y__ ''mech''] |
|
|
42 |
[[__-Z[[Z]__] [[__-f__ ''file''] |
|
|
43 |
!!DESCRIPTION |
|
|
44 |
|
|
|
45 |
|
|
|
46 |
__ldapmodify__ is a shell-accessible interface to the |
4 |
perry |
47 |
ldap_modify(3) and __ldap_add__(3) library calls. |
1 |
perry |
48 |
__ldapadd__ is implemented as a hard link to the |
|
|
49 |
ldapmodify tool. When invoked as __ldapadd__ the -a (add |
|
|
50 |
new entry) flag is turned on automatically. |
|
|
51 |
|
|
|
52 |
|
|
|
53 |
__ldapmodify__ opens a connection to an LDAP server, |
|
|
54 |
binds, and modifies or adds entries. The entry information |
|
|
55 |
is read from standard input or from ''file'' through the |
|
|
56 |
use of the -f option. |
|
|
57 |
!!OPTIONS |
|
|
58 |
|
|
|
59 |
|
|
|
60 |
__-a__ |
|
|
61 |
|
|
|
62 |
|
|
|
63 |
Add new entries. The default for __ldapmodify__ is to |
|
|
64 |
modify existing entries. If invoked as __ldapadd__, this |
|
|
65 |
flag is always set. |
|
|
66 |
|
|
|
67 |
|
|
|
68 |
__-c__ |
|
|
69 |
|
|
|
70 |
|
|
|
71 |
Continuous operation mode. Errors are reported, but |
|
|
72 |
__ldapmodify__ will continue with modifications. The |
|
|
73 |
default is to exit after reporting an error. |
|
|
74 |
|
|
|
75 |
|
|
|
76 |
__-n__ |
|
|
77 |
|
|
|
78 |
|
|
|
79 |
Show what would be done, but don't actually modify entries. |
|
|
80 |
Useful for debugging in conjunction with -v. |
|
|
81 |
|
|
|
82 |
|
|
|
83 |
__-v__ |
|
|
84 |
|
|
|
85 |
|
|
|
86 |
Use verbose mode, with many diagnostics written to standard |
|
|
87 |
output. |
|
|
88 |
|
|
|
89 |
|
|
|
90 |
__-k__ |
|
|
91 |
|
|
|
92 |
|
|
|
93 |
Use Kerberos IV authentication instead of simple |
|
|
94 |
authentication. It is assumed that you already have a valid |
|
|
95 |
ticket granting ticket. You must compile with Kerberos |
|
|
96 |
support for this option to have any effect. |
|
|
97 |
|
|
|
98 |
|
|
|
99 |
__-K__ |
|
|
100 |
|
|
|
101 |
|
|
|
102 |
Same as -k, but only does step 1 of the Kerberos IV bind. |
|
|
103 |
This is useful when connecting to a slapd and there is no |
|
|
104 |
x500dsa.hostname principal registered with your Kerberos |
|
|
105 |
Domain Controller(s). |
|
|
106 |
|
|
|
107 |
|
|
|
108 |
__-F__ |
|
|
109 |
|
|
|
110 |
|
|
|
111 |
Force application of all changes regardless of the contents |
|
|
112 |
of input lines that begin with ''replica:'' (by default, |
|
|
113 |
replica: lines are compared against the LDAP server host and |
|
|
114 |
port in use to decide if a replog record should actually be |
|
|
115 |
applied). |
|
|
116 |
|
|
|
117 |
|
|
|
118 |
__-M[[M]__ |
|
|
119 |
|
|
|
120 |
|
|
|
121 |
Enable manage DSA IT control. __-MM__ makes control |
|
|
122 |
critical. |
|
|
123 |
|
|
|
124 |
|
|
|
125 |
__-d__ ''debuglevel'' |
|
|
126 |
|
|
|
127 |
|
|
|
128 |
Set the LDAP debugging level to ''debuglevel''. |
|
|
129 |
__ldapmodify__ must be compiled with LDAP_DEBUG defined |
|
|
130 |
for this option to have any effect. |
|
|
131 |
|
|
|
132 |
|
|
|
133 |
__-f__ ''file'' |
|
|
134 |
|
|
|
135 |
|
|
|
136 |
Read the entry modification information from ''file'' |
|
|
137 |
instead of from standard input. |
|
|
138 |
|
|
|
139 |
|
|
|
140 |
__-x__ |
|
|
141 |
|
|
|
142 |
|
|
|
143 |
Use simple authentication instead of SASL. |
|
|
144 |
|
|
|
145 |
|
|
|
146 |
__-D__ ''binddn'' |
|
|
147 |
|
|
|
148 |
|
|
|
149 |
Use the Distinguished Name ''binddn'' to bind to the LDAP |
|
|
150 |
directory. |
|
|
151 |
|
|
|
152 |
|
|
|
153 |
__-W__ |
|
|
154 |
|
|
|
155 |
|
|
|
156 |
Prompt for simple authentication. This is used instead of |
|
|
157 |
specifying the password on the command line. |
|
|
158 |
|
|
|
159 |
|
|
|
160 |
__-w__ ''passwd'' |
|
|
161 |
|
|
|
162 |
|
|
|
163 |
Use ''passwd'' as the password for simple |
|
|
164 |
authentication. |
|
|
165 |
|
|
|
166 |
|
|
|
167 |
__-H__ ''ldapuri'' |
|
|
168 |
|
|
|
169 |
|
|
|
170 |
Specify URI(s) referring to the ldap server(s). |
|
|
171 |
|
|
|
172 |
|
|
|
173 |
__-h__ ''ldaphost'' |
|
|
174 |
|
|
|
175 |
|
|
|
176 |
Specify an alternate host on which the ldap server is |
|
|
177 |
running. Deprecated in favor of -H. |
|
|
178 |
|
|
|
179 |
|
|
|
180 |
__-p__ ''ldapport'' |
|
|
181 |
|
|
|
182 |
|
|
|
183 |
Specify an alternate TCP port where the ldap server is |
|
|
184 |
listening. Deprecated in favor of -H. |
|
|
185 |
|
|
|
186 |
|
|
|
187 |
__-P__ ''2''|''3'' |
|
|
188 |
|
|
|
189 |
|
|
|
190 |
Specify the LDAP protocol version to use. |
|
|
191 |
|
|
|
192 |
|
|
|
193 |
__-O__ ''security-properties'' |
|
|
194 |
|
|
|
195 |
|
|
|
196 |
Specify SASL security properties. |
|
|
197 |
|
|
|
198 |
|
|
|
199 |
__-I__ |
|
|
200 |
|
|
|
201 |
|
|
|
202 |
Enable SASL Interactive mode. Always prompt. Default is to |
|
|
203 |
prompt only as needed. |
|
|
204 |
|
|
|
205 |
|
|
|
206 |
__-Q__ |
|
|
207 |
|
|
|
208 |
|
|
|
209 |
Enable SASL Quiet mode. Never prompt. |
|
|
210 |
|
|
|
211 |
|
|
|
212 |
__-U__ ''authcid'' |
|
|
213 |
|
|
|
214 |
|
|
|
215 |
Specify the authentication ID for SASL bind. The form of the |
|
|
216 |
ID depends on the actual SASL mechanism used. |
|
|
217 |
|
|
|
218 |
|
|
|
219 |
__-X__ ''authzid'' |
|
|
220 |
|
|
|
221 |
|
|
|
222 |
Specify the requested authorization ID for SASL bind. |
|
|
223 |
''authzid'' must be one of the following formats: |
|
|
224 |
__dn:__'''' or |
|
|
225 |
__u:__'''' |
|
|
226 |
|
|
|
227 |
|
|
|
228 |
__-Y__ ''mech'' |
|
|
229 |
|
|
|
230 |
|
|
|
231 |
Specify the SASL mechanism to be used for authentication. If |
|
|
232 |
it's not specified, the program will choose the best |
|
|
233 |
mechanism the server knows. |
|
|
234 |
|
|
|
235 |
|
|
|
236 |
__-Z[[Z]__ |
|
|
237 |
|
|
|
238 |
|
|
|
239 |
Issue StartTLS (Transport Layer Security) extended |
|
|
240 |
operation. If you use __-ZZ__, the command will require |
|
|
241 |
the operation to be successful. |
|
|
242 |
!!INPUT FORMAT |
|
|
243 |
|
|
|
244 |
|
|
|
245 |
The contents of ''file'' (or standard input if no -f flag |
|
|
246 |
is given on the command line) should conform to the format |
4 |
perry |
247 |
defined in slapd.replog(5), with the exceptions noted |
1 |
perry |
248 |
below. |
|
|
249 |
|
|
|
250 |
|
|
|
251 |
Lines that begin with |
|
|
252 |
ldapmodify'' to apply all of |
|
|
253 |
the replog changes, regardless of the presence or absence of |
|
|
254 |
any '' |
|
|
255 |
|
|
|
256 |
|
|
|
257 |
If no |
|
|
258 |
ldapmodify)'' and |
|
|
259 |
'' |
|
|
260 |
|
|
|
261 |
|
|
|
262 |
If changetype is |
|
|
263 |
ldapmodify__(1) for ldapadd(1). |
|
|
264 |
|
|
|
265 |
|
4 |
perry |
266 |
Note that the above exceptions to the slapd.replog(5) |
1 |
perry |
267 |
format allow ldif(5) entries to be used as input to |
|
|
268 |
''ldapmodify'' or ''ldapadd.'' |
|
|
269 |
!!EXAMPLES |
|
|
270 |
|
|
|
271 |
|
|
|
272 |
Assuming that the file __/tmp/entrymods__ exists and has |
|
|
273 |
the contents: |
|
|
274 |
|
|
|
275 |
|
|
|
276 |
dn: cn=Modify Me, dc=example, dc=com |
|
|
277 |
changetype: modify |
|
|
278 |
replace: mail |
|
|
279 |
mail: modme@OpenLDAP.org |
|
|
280 |
- |
|
|
281 |
add: title |
|
|
282 |
title: Grand Poobah |
|
|
283 |
- |
|
|
284 |
add: jpegPhoto |
|
|
285 |
jpegPhoto: |
|
|
286 |
the command: |
|
|
287 |
|
|
|
288 |
|
|
|
289 |
ldapmodify -r -f /tmp/entrymods |
|
|
290 |
will replace the contents of the mail'' attribute with the value ''title'' of ''jpegPhoto'', and completely remove the ''description'' attribute. |
|
|
291 |
|
|
|
292 |
|
|
|
293 |
Assuming that the file __/tmp/newentry__ exists and has |
|
|
294 |
the contents: |
|
|
295 |
|
|
|
296 |
|
|
|
297 |
dn: cn=Barbara Jensen, dc=example, dc=com |
|
|
298 |
objectClass: person |
|
|
299 |
cn: Barbara Jensen |
|
|
300 |
cn: Babs Jensen |
|
|
301 |
sn: Jensen |
|
|
302 |
title: the world's most famous mythical manager |
|
|
303 |
mail: bjensen@example.com |
|
|
304 |
uid: bjensen |
|
|
305 |
the command: |
|
|
306 |
ldapadd -f /tmp/entrymods |
|
|
307 |
will add a new entry for Babs Jensen, using the values from the file __/tmp/newentry.__ |
|
|
308 |
|
|
|
309 |
|
|
|
310 |
Assuming that the file __/tmp/newentry__ exists and has |
|
|
311 |
the contents: |
|
|
312 |
|
|
|
313 |
|
|
|
314 |
dn: cn=Barbara Jensen, dc=example, dc=com |
|
|
315 |
changetype: delete |
|
|
316 |
the command: |
|
|
317 |
ldapmodify -f /tmp/entrymods |
|
|
318 |
will remove Babs Jensen's entry. |
|
|
319 |
!!DIAGNOSTICS |
|
|
320 |
|
|
|
321 |
|
|
|
322 |
Exit status is zero if no errors occur. Errors result in a |
|
|
323 |
non-zero exit status and a diagnostic message being written |
|
|
324 |
to standard error. |
|
|
325 |
!!SEE ALSO |
|
|
326 |
|
|
|
327 |
|
|
|
328 |
ldapadd(1), ldapdelete(1), |
|
|
329 |
ldapmodrdn(1), ldapsearch(1), |
4 |
perry |
330 |
ldap.conf(5), ldap(3), __ldap_add__(3), |
|
|
331 |
ldap_delete(3), __ldap_modify__(3), |
|
|
332 |
ldap_modrdn(3), __slapd.replog__(5) |
1 |
perry |
333 |
!!BUGS |
|
|
334 |
|
|
|
335 |
|
|
|
336 |
There is no interactive mode, but there probably should |
|
|
337 |
be. |
|
|
338 |
!!AUTHOR |
|
|
339 |
|
|
|
340 |
|
|
|
341 |
The OpenLDAP Project |
|
|
342 |
!!ACKNOWLEDGEMENTS |
|
|
343 |
|
|
|
344 |
|
|
|
345 |
__OpenLDAP__ is developed and maintained by The OpenLDAP |
|
|
346 |
Project (http://www.openldap.org/). __OpenLDAP__ is |
|
|
347 |
derived from University of Michigan LDAP 3.3 |
|
|
348 |
Release. |
|
|
349 |
---- |