]> git.sur5r.net Git - openldap/blob - doc/man/man8/slapmodify.8
Happy New Year
[openldap] / doc / man / man8 / slapmodify.8
1 .TH SLAPMODIFY 8C "RELEASEDATE" "OpenLDAP LDVERSION"
2 .\" Copyright 1998-2018 The OpenLDAP Foundation All Rights Reserved.
3 .\" Copying restrictions apply.  See COPYRIGHT/LICENSE.
4 .\" $OpenLDAP$
5 .SH NAME
6 slapmodify \- Modify entries in a SLAPD database
7 .SH SYNOPSIS
8 .B SBINDIR/slapmodify
9 [\c
10 .BI \-b \ suffix\fR]
11 [\c
12 .BR \-c ]
13 [\c
14 .BI \-d \ debug-level\fR]
15 [\c
16 .BI \-f \ slapd.conf\fR]
17 [\c
18 .BI \-F \ confdir\fR]
19 [\c
20 .BR \-g ]
21 [\c
22 .BI \-j \ lineno\fR]
23 [\c
24 .BI \-l \ ldif-file\fR]
25 [\c
26 .BI \-n \ dbnum\fR]
27 [\c
28 .BI \-o \ option\fR[ = value\fR]]
29 [\c
30 .BR \-q ]
31 [\c
32 .BR \-s ]
33 [\c
34 .BI \-S \ SID\fR]
35 [\c
36 .BR \-u ]
37 [\c
38 .BR \-v ]
39 [\c
40 .BR \-w ]
41 .SH DESCRIPTION
42 .LP
43 .B Slapmodify
44 is used to apply modifications specified in LDAP Directory Interchange Format
45 (LDIF) to a
46 .BR slapd (8)
47 database.
48 It opens the given database determined by the database number or
49 suffix and performs modifications corresponding to the provided LDIF to
50 the database.
51 Databases configured as
52 .B subordinate
53 of this one are also updated, unless \fB\-g\fP is specified.
54 The LDIF input is read from standard input or the specified file.
55
56 All files eventually created by
57 .BR slapmodify
58 will belong to the identity
59 .BR slapmodify
60 is run as, so make sure you either run
61 .BR slapmodify
62 with the same identity
63 .BR slapd (8)
64 will be run as (see option
65 .B \-u
66 in
67 .BR slapd (8)),
68 or change file ownership before running
69 .BR slapd (8).
70
71 Note: slapmodify will also perform the relevant indexing whilst modifying the database if
72 any are configured. For specific details, please see
73 .BR slapindex (8).
74 .SH OPTIONS
75 .TP
76 .BI \-b \ suffix
77 Use the specified \fIsuffix\fR to determine which database to
78 add entries to.  The \fB\-b\fP cannot be used in conjunction
79 with the
80 .B \-n
81 option.
82 .TP
83 .B \-c
84 enable continue (ignore errors) mode.
85 .TP
86 .BI \-d \ debug-level
87 enable debugging messages as defined by the specified
88 .IR debug-level ;
89 see
90 .BR slapd (8)
91 for details.
92 .TP
93 .BI \-f \ slapd.conf
94 specify an alternative
95 .BR slapd.conf (5)
96 file.
97 .TP
98 .BI \-F \ confdir
99 specify a config directory.
100 If both
101 .B \-f
102 and
103 .B \-F
104 are specified, the config file will be read and converted to
105 config directory format and written to the specified directory.
106 If neither option is specified, an attempt to read the
107 default config directory will be made before trying to use the default
108 config file. If a valid config directory exists then the
109 default config file is ignored. If dry-run mode is also specified,
110 no conversion will occur.
111 .TP
112 .B \-g
113 disable subordinate gluing.  Only the specified database will be
114 processed, and not its glued subordinates (if any).
115 .TP
116 .BI \-j \ lineno
117 Jump to the specified line number in the LDIF file before processing
118 any entries. This allows a modification that was aborted due to errors in the
119 input LDIF to be resumed after the errors are corrected.
120 .TP
121 .BI \-l \ ldif-file
122 Read LDIF from the specified file instead of standard input.
123 .TP
124 .BI \-n \ dbnum
125 Perform changes on the \fIdbnum\fR-th database listed in the
126 configuration file.  The
127 .B \-n
128 cannot be used in conjunction with the
129 .B \-b
130 option.
131 To manipulate the config database
132 .BR slapd\-config (5),
133 use
134 .B \-n 0
135 as it is always the first database. It must physically exist
136 on the filesystem prior to this, however.
137 .TP
138 .BI \-o \ option\fR[ = value\fR]
139 Specify an
140 .I option
141 with a(n optional)
142 .IR value .
143 Possible generic options/values are:
144 .LP
145 .nf
146               syslog=<subsystems>  (see `\-s' in slapd(8))
147               syslog\-level=<level> (see `\-S' in slapd(8))
148               syslog\-user=<user>   (see `\-l' in slapd(8))
149
150               schema-check={yes|no}
151               value-check={yes|no}
152
153 .in
154 The \fIschema\-check\fR option toggles schema checking (default on);
155 the \fIvalue\-check\fR option toggles value checking (default off).
156 The latter is incompatible with \fB-q\fR.
157 .TP
158 .B \-q
159 enable quick (fewer integrity checks) mode.  Does fewer consistency checks
160 on the input data, and no consistency checks when writing the database.
161 Improves the run time but if any errors or interruptions occur the resulting
162 database will be unusable.
163 .TP
164 .B \-s
165 disable schema checking.  This option is intended to be used when
166 manipulating databases containing special objects, such as fractional
167 objects on a partial replica.  Creating normal objects which do not
168 conform to schema may result in unexpected and ill behavior.
169 .TP
170 .BI \-S \ SID
171 Server ID to use in generated entryCSN.  Also used for contextCSN
172 if \fB\-w\fP is set as well.  Defaults to \fB0\fP.
173 .TP
174 .B \-u
175 enable dry-run (don't write to backend) mode.
176 .TP
177 .B \-v
178 enable verbose mode.
179 .TP
180 .BI \-w
181 write syncrepl context information.
182 After all entries are added, the contextCSN
183 will be updated with the greatest CSN in the database.
184 .SH LIMITATIONS
185 Your
186 .BR slapd (8)
187 should not be running
188 when you do this to ensure consistency of the database.
189 .LP
190 Not all backends support all types of modification, \fImodrdn\fR
191 changetype in particular is not implemented for any of the current
192 backends.
193 .LP
194 .B slapmodify
195 may not provide naming or schema checks.  It is advisable to
196 use
197 .BR ldapmodify (1)
198 when possible.
199 .SH EXAMPLES
200 To make modifications specified in file
201 .B ldif
202 into your
203 .BR slapd (8)
204 database give the command:
205 .LP
206 .nf
207 .ft tt
208         SBINDIR/slapmodify \-l ldif
209 .ft
210 .fi
211 .SH "SEE ALSO"
212 .BR ldap (3),
213 .BR ldif (5),
214 .BR slapcat (8),
215 .BR slapadd (8),
216 .BR slapindex (8),
217 .BR ldapmodify (1),
218 .BR slapd (8)
219 .LP
220 "OpenLDAP Administrator's Guide" (http://www.OpenLDAP.org/doc/admin/)
221 .SH ACKNOWLEDGEMENTS
222 .so ../Project