1 .TH LDAPMODIFY 1 "10 November 1998" "OpenLDAP LDVERSION"
3 ldapmodify, ldapadd \- ldap modify entry and ldap add entry tools
21 .BI \-d \ debuglevel\fR]
29 .BI \-h \ ldaphost\fR]
31 .BI \-p \ ldapport\fR]
51 .BI \-d \ debuglevel\fR]
57 .BI \-h \ ldaphost\fR]
59 .BI \-p \ ldapport\fR]
64 is a shell-accessible interface to the
70 is implemented as a hard link to the ldapmodify tool. When invoked as
72 the -a (add new entry) flag is turned on automatically.
75 opens a connection to an LDAP server, binds, and modifies or adds entries.
76 The entry information is read from standard input or from \fIfile\fP through
77 the use of the -f option.
81 Add new entries. The default for
83 is to modify existing entries. If invoked as
85 this flag is always set.
88 Assume that any values that start with a `/' are binary values and that
89 the actual value is in a file whose path is specified in the place where
90 values normally appear.
93 Continuous operation mode. Errors are reported, but
95 will continue with modifications. The default is to exit after
99 Replace existing values by default.
102 Show what would be done, but don't actually modify entries. Useful for
103 debugging in conjunction with -v.
106 Use verbose mode, with many diagnostics written to standard output.
109 Use Kerberos authentication instead of simple authentication. It is
110 assumed that you already have a valid ticket granting ticket. You must
111 compile with KERBEROS defined for this option to have any effect.
114 Same as \-k, but only does step 1 of the kerberos bind. This is useful
115 when connecting to a slapd and there is no x500dsa.hostname principal
116 registered with your kerberos servers.
119 Force application of all changes regardless of the contents of input
120 lines that begin with
122 (by default, replica: lines are compared against the LDAP server host
123 and port in use to decide if a replog record should actually be applied).
126 Set the LDAP debugging level to \fIdebuglevel\fP.
128 must be compiled with LDAP_DEBUG defined for this option to have any effect.
131 Read the entry modification information from \fIfile\fP instead of from
135 Use \fIbinddn\fP to bind to the LDAP directory. \fIbinddn\fP should be
136 a string-represented DN as defined in RFC 1779.
139 Prompt for simple authentication.
140 This is used instead of specifying the password on the command line.
143 Use \fIpasswd\fP as the password for simple authentication.
146 Specify an alternate host on which the ldap server is running.
149 Specify an alternate TCP port where the ldap server is listening.
151 The contents of \fIfile\fP (or standard input if no \-f flag is given on
152 the command line) should conform to the format defined in
153 .BR slapd.replog (5),
154 with the exceptions noted below.
156 If the first line of a record consists of a decimal number (entry id),
159 Lines that begin with "replica:" are matched against the LDAP server host
160 and port in use to decide if a particular replog record should be applied.
161 Any other lines that precede the "dn:" line are ignored.
162 The -F flag can be used to force
164 to apply all of the replog changes, regardless of the presence or
165 absence of any "replica:" lines.
167 If no "changetype:" line is present, the default is "add" if the -a
168 flag is set (or if the program was invoked as
170 and "modify" otherwise.
172 If changetype is "modify" and no "add:", "replace:", or "delete:" lines
173 appear, the default is "replace" if the -r flag is set and "add"
176 Note that the above exceptions to the
180 entries to be used as input to
184 .SH ALTERNATIVE INPUT FORMAT
185 An alternative input format is supported for compatibility with older
188 This format consists of one or more entries separated by blank lines,
189 where each entry looks like:
192 Distinguished Name (DN)
197 where \fIattr\fP is the name of the attribute and \fIvalue\fP is the
200 By default, values are added. If the
203 given, the default is to replace existing values with the new one.
204 Note that it is permissible for a given attribute to appear more than
205 once (for example, to add more than one value for an attribute). Also
206 note that you can use a trailing `\\' to continue values across lines and
207 preserve newlines in the value itself (this is useful for modifying
208 QUIPU iattr attributes among others).
211 should be preceded by a \fB-\fP to remove a value. The `=' and
212 value should be omitted to remove an entire attribute.
215 should be preceded by a \fB+\fP to add a value in the presence of the
219 Assuming that the file
221 exists and has the contents:
224 dn: cn=Modify Me, o=University of Michigan, c=US
227 mail: modme@terminator.rs.itd.umich.edu
233 jpegPhoto: /tmp/modme.jpeg
242 ldapmodify -b -r -f /tmp/entrymods
245 will replace the contents of the "Modify Me" entry's
247 attribute with the value "modme@terminator.rs.itd.umich.edu", add a
249 of "Grand Poobah", and the contents of the file "/tmp/modme.jpeg"
252 and completely remove the
255 The same modifications as above can be performed using the older
260 cn=Modify Me, o=University of Michigan, c=US
261 mail=modme@terminator.rs.itd.umich.edu
263 +jpegPhoto=/tmp/modme.jpeg
270 ldapmodify -b -r -f /tmp/entrymods
273 Assuming that the file
275 exists and has the contents:
278 dn: cn=Barbara Jensen, o=University of Michigan, c=US
283 title: the world's most famous mythical manager
284 mail: bjensen@terminator.rs.itd.umich.edu
290 ldapadd -f /tmp/entrymods
293 will add a new entry for Babs Jensen, using the values from the
297 Assuming that the file
299 exists and has the contents:
302 dn: cn=Barbara Jensen, o=University of Michigan, c=US
308 ldapmodify -f /tmp/entrymods
311 will remove Babs Jensen's entry.
313 Exit status is 0 if no errors occur. Errors result in a non-zero exit
314 status and a diagnostic message being written to standard error.
329 .IR "A String Representation of Distinguished Names",
332 ISODE Consortium, March 1995.
334 There is no interactive mode, but there probably should be.
337 is developed and maintained by The OpenLDAP Project (http://www.openldap.org/).
339 is derived from University of Michigan LDAP 3.3 Release.