1 .TH LDAPMODIFY 1 "20 August 2000" "OpenLDAP LDVERSION"
3 .\" Copyright 1998-2000 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]
38 .BI \-h \ ldaphost\fR]
40 .BI \-p \ ldapport\fR]
42 .BI \-P \ 2\fR\||\|\fI3\fR]
44 .BR \-O \ security-properties ]
50 .BI \-U \ username\fR]
80 .BI \-d \ debuglevel\fR]
88 .BI \-h \ ldaphost\fR]
90 .BI \-p \ ldapport\fR]
92 .BI \-P \ 2\fR\||\|\fI3\fR]
94 .BR \-O \ security-properties ]
100 .BI \-U \ username\fR]
104 .BI \-X \ authzid\fR]
113 is a shell-accessible interface to the
119 is implemented as a hard link to the ldapmodify tool. When invoked as
121 the -a (add new entry) flag is turned on automatically.
124 opens a connection to an LDAP server, binds, and modifies or adds entries.
125 The entry information is read from standard input or from \fIfile\fP through
126 the use of the -f option.
130 Add new entries. The default for
132 is to modify existing entries. If invoked as
134 this flag is always set.
137 Automatically chase referrals.
140 Continuous operation mode. Errors are reported, but
142 will continue with modifications. The default is to exit after
146 Replace existing values by default.
149 Show what would be done, but don't actually modify entries. Useful for
150 debugging in conjunction with -v.
153 Use verbose mode, with many diagnostics written to standard output.
156 Use Kerberos authentication instead of simple authentication. It is
157 assumed that you already have a valid ticket granting ticket. You must
158 compile with Kerberos support for this option to have any effect.
161 Same as \-k, but only does step 1 of the Kerberos bind. This is useful
162 when connecting to a slapd and there is no x500dsa.hostname principal
163 registered with your Kerberos servers.
166 Force application of all changes regardless of the contents of input
167 lines that begin with
169 (by default, replica: lines are compared against the LDAP server host
170 and port in use to decide if a replog record should actually be applied).
173 Enable manage DSA IT control.
175 makes control critical.
178 Set the LDAP debugging level to \fIdebuglevel\fP.
180 must be compiled with LDAP_DEBUG defined for this option to have any effect.
183 Read the entry modification information from \fIfile\fP instead of from
187 Use simple authentication instead of SASL.
190 Use the Distinguished Name \fIbinddn\fP to bind to the LDAP directory.
193 Prompt for simple authentication.
194 This is used instead of specifying the password on the command line.
197 Use \fIpasswd\fP as the password for simple authentication.
200 Specify URI(s) referring to the ldap server(s).
203 Specify an alternate host on which the ldap server is running.
204 Deprecated in favor of -H.
207 Specify an alternate TCP port where the ldap server is listening.
208 Deprecated in favor of -H.
210 .BI \-P \ 2\fR\||\|\fI3
211 Specify the LDAP protocol version to use.
213 .BI \-O \ security-properties
214 Specify SASL security properties.
217 Enable SASL Interactive mode. Always prompt. Default is to prompt
221 Enable SASL Quiet mode. Never prompt.
224 Specify the username for SASL bind. The syntax of the username depends on the
225 actual SASL mechanism used.
228 Specify the requested authorization ID for SASL bind.
230 must be one of the following formats:
232 .I <distinguished name>
238 Specify the SASL mechanism to be used for authentication. If it's not
239 specified, the program will choose the best mechanism the server knows.
242 Issue StartTLS (Transport Layer Security) extended operation. If you use
244 , the command will require the operation to be successful.
246 The contents of \fIfile\fP (or standard input if no \-f flag is given on
247 the command line) should conform to the format defined in
248 .BR slapd.replog (5),
249 with the exceptions noted below.
251 Lines that begin with "replica:" are matched against the LDAP server host
252 and port in use to decide if a particular replog record should be applied.
253 Any other lines that precede the "dn:" line are ignored.
254 The -F flag can be used to force
256 to apply all of the replog changes, regardless of the presence or
257 absence of any "replica:" lines.
259 If no "changetype:" line is present, the default is "add" if the -a
260 flag is set (or if the program was invoked as
262 and "modify" otherwise.
264 If changetype is "modify" and no "add:", "replace:", or "delete:" lines
265 appear, the default is "replace" if the -r flag is set and "add"
268 Note that the above exceptions to the
272 entries to be used as input to
277 Assuming that the file
279 exists and has the contents:
282 dn: cn=Modify Me, dc=example, dc=com
285 mail: modme@OpenLDAP.org
291 jpegPhoto:< file://tmp/modme.jpeg
300 ldapmodify -r -f /tmp/entrymods
303 will replace the contents of the "Modify Me" entry's
305 attribute with the value "modme@example.com", add a
307 of "Grand Poobah", and the contents of the file "/tmp/modme.jpeg"
310 and completely remove the
314 Assuming that the file
316 exists and has the contents:
319 dn: cn=Barbara Jensen, dc=example, dc=com
324 title: the world's most famous mythical manager
325 mail: bjensen@example.com
331 ldapadd -f /tmp/entrymods
334 will add a new entry for Babs Jensen, using the values from the
338 Assuming that the file
340 exists and has the contents:
343 dn: cn=Barbara Jensen, dc=example, dc=com
349 ldapmodify -f /tmp/entrymods
352 will remove Babs Jensen's entry.
354 Exit status is zero if no errors occur. Errors result in a non-zero
355 exit status and a diagnostic message being written to standard error.
369 There is no interactive mode, but there probably should be.
371 The OpenLDAP Project <http://www.openldap.org/>
374 is developed and maintained by The OpenLDAP Project (http://www.openldap.org/).
376 is derived from University of Michigan LDAP 3.3 Release.