1 .TH LDAPMODIFY 1 "RELEASEDATE" "OpenLDAP LDVERSION"
3 .\" Copyright 1998-2002 The OpenLDAP Foundation All Rights Reserved.
4 .\" Copying restrictions apply. See COPYRIGHT/LICENSE.
6 ldapmodify, ldapadd \- LDAP modify entry and LDAP add entry tools
28 .BI \-d \ debuglevel\fR]
36 .BI \-y \ passwdfile\fR]
40 .BI \-h \ ldaphost\fR]
42 .BI \-p \ ldapport\fR]
44 .BI \-P \ 2\fR\||\|\fI3\fR]
46 .BR \-O \ security-properties ]
84 .BI \-d \ debuglevel\fR]
92 .BI \-y \ passwdfile\fR]
94 .BI \-h \ ldaphost\fR]
96 .BI \-p \ ldapport\fR]
98 .BI \-P \ 2\fR\||\|\fI3\fR]
100 .BR \-O \ security-properties ]
106 .BI \-U \ authcid\fR]
112 .BI \-X \ authzid\fR]
121 is a shell-accessible interface to the
127 is implemented as a hard link to the ldapmodify tool. When invoked as
129 the -a (add new entry) flag is turned on automatically.
132 opens a connection to an LDAP server, binds, and modifies or adds entries.
133 The entry information is read from standard input or from \fIfile\fP through
134 the use of the -f option.
138 Add new entries. The default for
140 is to modify existing entries. If invoked as
142 this flag is always set.
145 Automatically chase referrals.
148 Continuous operation mode. Errors are reported, but
150 will continue with modifications. The default is to exit after
154 Add or change records which where skipped due to an error are written to \fIfile\fP
155 and the error message returned by the server is added as a comment. Most useful in
159 Show what would be done, but don't actually modify entries. Useful for
160 debugging in conjunction with -v.
163 Use verbose mode, with many diagnostics written to standard output.
166 Use Kerberos IV authentication instead of simple authentication. It is
167 assumed that you already have a valid ticket granting ticket. You must
168 compile with Kerberos support for this option to have any effect.
171 Same as \-k, but only does step 1 of the Kerberos IV bind. This is useful
172 when connecting to a slapd and there is no x500dsa.hostname principal
173 registered with your Kerberos Domain Controller(s).
176 Force application of all changes regardless of the contents of input
177 lines that begin with
179 (by default, replica: lines are compared against the LDAP server host
180 and port in use to decide if a replog record should actually be applied).
183 Enable manage DSA IT control.
185 makes control critical.
188 Set the LDAP debugging level to \fIdebuglevel\fP.
190 must be compiled with LDAP_DEBUG defined for this option to have any effect.
193 Read the entry modification information from \fIfile\fP instead of from
197 Use simple authentication instead of SASL.
200 Use the Distinguished Name \fIbinddn\fP to bind to the LDAP directory.
203 Prompt for simple authentication.
204 This is used instead of specifying the password on the command line.
207 Use \fIpasswd\fP as the password for simple authentication.
210 Use complete contents of \fIpasswdfile\fP as the password for
211 simple authentication.
214 Specify URI(s) referring to the ldap server(s).
217 Specify an alternate host on which the ldap server is running.
218 Deprecated in favor of -H.
221 Specify an alternate TCP port where the ldap server is listening.
222 Deprecated in favor of -H.
224 .BI \-P \ 2\fR\||\|\fI3
225 Specify the LDAP protocol version to use.
227 .BI \-O \ security-properties
228 Specify SASL security properties.
231 Enable SASL Interactive mode. Always prompt. Default is to prompt
235 Enable SASL Quiet mode. Never prompt.
238 Specify the authentication ID for SASL bind. The form of the ID
239 depends on the actual SASL mechanism used.
242 Specify the realm of authentication ID for SASL bind. The form of the realm
243 depends on the actual SASL mechanism used.
246 Specify the requested authorization ID for SASL bind.
248 must be one of the following formats:
250 .I <distinguished name>
256 Specify the SASL mechanism to be used for authentication. If it's not
257 specified, the program will choose the best mechanism the server knows.
260 Issue StartTLS (Transport Layer Security) extended operation. If you use
262 , the command will require the operation to be successful.
264 The contents of \fIfile\fP (or standard input if no \-f flag is given on
265 the command line) should conform to the format defined in
266 .BR slapd.replog (5),
267 with the exceptions noted below.
269 Lines that begin with "replica:" are matched against the LDAP server host
270 and port in use to decide if a particular replog record should be applied.
271 Any other lines that precede the "dn:" line are ignored.
272 The -F flag can be used to force
274 to apply all of the replog changes, regardless of the presence or
275 absence of any "replica:" lines.
277 If no "changetype:" line is present, the default is "add" if the -a
278 flag is set (or if the program was invoked as
280 and "modify" otherwise.
282 If changetype is "modify" and no "add:", "replace:", or "delete:" lines
283 appear, the default is "replace" for and "add"
288 Note that the above exceptions to the
292 entries to be used as input to
297 Assuming that the file
299 exists and has the contents:
302 dn: cn=Modify Me,dc=example,dc=com
305 mail: modme@OpenLDAP.org
311 jpegPhoto:< file://tmp/modme.jpeg
320 ldapmodify -f /tmp/entrymods
323 will replace the contents of the "Modify Me" entry's
325 attribute with the value "modme@example.com", add a
327 of "Grand Poobah", and the contents of the file "/tmp/modme.jpeg"
330 and completely remove the
334 Assuming that the file
336 exists and has the contents:
339 dn: cn=Barbara Jensen,dc=example,dc=com
344 title: the world's most famous mythical manager
345 mail: bjensen@example.com
351 ldapadd -f /tmp/entrymods
354 will add a new entry for Babs Jensen, using the values from the
358 Assuming that the file
360 exists and has the contents:
363 dn: cn=Barbara Jensen,dc=example,dc=com
369 ldapmodify -f /tmp/entrymods
372 will remove Babs Jensen's entry.
374 Exit status is zero if no errors occur. Errors result in a non-zero
375 exit status and a diagnostic message being written to standard error.
389 The OpenLDAP Project <http://www.openldap.org/>
392 is developed and maintained by The OpenLDAP Project (http://www.openldap.org/).
394 is derived from University of Michigan LDAP 3.3 Release.