1 .TH LDAPMODIFY 1 "20 August 2001" "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
26 .BI \-d \ debuglevel\fR]
36 .BI \-h \ ldaphost\fR]
38 .BI \-p \ ldapport\fR]
40 .BI \-P \ 2\fR\||\|\fI3\fR]
42 .BR \-O \ security-properties ]
76 .BI \-d \ debuglevel\fR]
84 .BI \-h \ ldaphost\fR]
86 .BI \-p \ ldapport\fR]
88 .BI \-P \ 2\fR\||\|\fI3\fR]
90 .BR \-O \ security-properties ]
100 .BI \-X \ authzid\fR]
109 is a shell-accessible interface to the
115 is implemented as a hard link to the ldapmodify tool. When invoked as
117 the -a (add new entry) flag is turned on automatically.
120 opens a connection to an LDAP server, binds, and modifies or adds entries.
121 The entry information is read from standard input or from \fIfile\fP through
122 the use of the -f option.
126 Add new entries. The default for
128 is to modify existing entries. If invoked as
130 this flag is always set.
133 Automatically chase referrals.
136 Continuous operation mode. Errors are reported, but
138 will continue with modifications. The default is to exit after
142 Show what would be done, but don't actually modify entries. Useful for
143 debugging in conjunction with -v.
146 Use verbose mode, with many diagnostics written to standard output.
149 Use Kerberos IV authentication instead of simple authentication. It is
150 assumed that you already have a valid ticket granting ticket. You must
151 compile with Kerberos support for this option to have any effect.
154 Same as \-k, but only does step 1 of the Kerberos IV bind. This is useful
155 when connecting to a slapd and there is no x500dsa.hostname principal
156 registered with your Kerberos Domain Controller(s).
159 Force application of all changes regardless of the contents of input
160 lines that begin with
162 (by default, replica: lines are compared against the LDAP server host
163 and port in use to decide if a replog record should actually be applied).
166 Enable manage DSA IT control.
168 makes control critical.
171 Set the LDAP debugging level to \fIdebuglevel\fP.
173 must be compiled with LDAP_DEBUG defined for this option to have any effect.
176 Read the entry modification information from \fIfile\fP instead of from
180 Use simple authentication instead of SASL.
183 Use the Distinguished Name \fIbinddn\fP to bind to the LDAP directory.
186 Prompt for simple authentication.
187 This is used instead of specifying the password on the command line.
190 Use \fIpasswd\fP as the password for simple authentication.
193 Specify URI(s) referring to the ldap server(s).
196 Specify an alternate host on which the ldap server is running.
197 Deprecated in favor of -H.
200 Specify an alternate TCP port where the ldap server is listening.
201 Deprecated in favor of -H.
203 .BI \-P \ 2\fR\||\|\fI3
204 Specify the LDAP protocol version to use.
206 .BI \-O \ security-properties
207 Specify SASL security properties.
210 Enable SASL Interactive mode. Always prompt. Default is to prompt
214 Enable SASL Quiet mode. Never prompt.
217 Specify the authentication ID for SASL bind. The form of the ID
218 depends on the actual SASL mechanism used.
221 Specify the requested authorization ID for SASL bind.
223 must be one of the following formats:
225 .I <distinguished name>
231 Specify the SASL mechanism to be used for authentication. If it's not
232 specified, the program will choose the best mechanism the server knows.
235 Issue StartTLS (Transport Layer Security) extended operation. If you use
237 , the command will require the operation to be successful.
239 The contents of \fIfile\fP (or standard input if no \-f flag is given on
240 the command line) should conform to the format defined in
241 .BR slapd.replog (5),
242 with the exceptions noted below.
244 Lines that begin with "replica:" are matched against the LDAP server host
245 and port in use to decide if a particular replog record should be applied.
246 Any other lines that precede the "dn:" line are ignored.
247 The -F flag can be used to force
249 to apply all of the replog changes, regardless of the presence or
250 absence of any "replica:" lines.
252 If no "changetype:" line is present, the default is "add" if the -a
253 flag is set (or if the program was invoked as
255 and "modify" otherwise.
257 If changetype is "modify" and no "add:", "replace:", or "delete:" lines
258 appear, the default is "replace" for and "add"
263 Note that the above exceptions to the
267 entries to be used as input to
272 Assuming that the file
274 exists and has the contents:
277 dn: cn=Modify Me,dc=example,dc=com
280 mail: modme@OpenLDAP.org
286 jpegPhoto:< file://tmp/modme.jpeg
295 ldapmodify -f /tmp/entrymods
298 will replace the contents of the "Modify Me" entry's
300 attribute with the value "modme@example.com", add a
302 of "Grand Poobah", and the contents of the file "/tmp/modme.jpeg"
305 and completely remove the
309 Assuming that the file
311 exists and has the contents:
314 dn: cn=Barbara Jensen,dc=example,dc=com
319 title: the world's most famous mythical manager
320 mail: bjensen@example.com
326 ldapadd -f /tmp/entrymods
329 will add a new entry for Babs Jensen, using the values from the
333 Assuming that the file
335 exists and has the contents:
338 dn: cn=Barbara Jensen,dc=example,dc=com
344 ldapmodify -f /tmp/entrymods
347 will remove Babs Jensen's entry.
349 Exit status is zero if no errors occur. Errors result in a non-zero
350 exit status and a diagnostic message being written to standard error.
364 The OpenLDAP Project <http://www.openldap.org/>
367 is developed and maintained by The OpenLDAP Project (http://www.openldap.org/).
369 is derived from University of Michigan LDAP 3.3 Release.