]> git.sur5r.net Git - openldap/blob - doc/man/man8/slapschema.8
881e071802003e90f4312e184a0c625800439396
[openldap] / doc / man / man8 / slapschema.8
1 .TH SLAPSCHEMA 8C "RELEASEDATE" "OpenLDAP LDVERSION"
2 .\" Copyright 1998-2015 The OpenLDAP Foundation All Rights Reserved.
3 .\" Copying restrictions apply.  See COPYRIGHT/LICENSE.
4 .\" $OpenLDAP$
5 .SH NAME
6 slapschema \- SLAPD in-database schema checking utility
7 .SH SYNOPSIS
8 .B SBINDIR/slapschema
9 [\c
10 .BI \-a filter\fR]
11 [\c
12 .BI \-b suffix\fR]
13 [\c
14 .BR \-c ]
15 [\c
16 .BI \-d debug-level\fR]
17 [\c
18 .BI \-f slapd.conf\fR]
19 [\c
20 .BI \-F confdir\fR]
21 [\c
22 .BR \-g ]
23 [\c
24 .BI \-H URI\fR]
25 [\c
26 .BI \-l error-file\fR]
27 [\c
28 .BI \-n dbnum\fR]
29 [\c
30 .BI \-o option\fR[ = value\fR]]
31 [\c
32 .BI \-s subtree-dn\fR]
33 [\c
34 .BR \-v ]
35 .LP
36 .SH DESCRIPTION
37 .LP
38 .B Slapschema
39 is used to check schema compliance of the contents of a
40 .BR slapd (8)
41 database.
42 It opens the given database determined by the database number or
43 suffix and checks the compliance of its contents with the corresponding
44 schema. Errors are written to standard output or the specified file.
45 Databases configured as
46 .B subordinate
47 of this one are also output, unless \fB\-g\fP is specified.
48 .LP
49 Administrators may need to modify existing schema items, including
50 adding new required attributes to objectClasses,
51 removing existing required or allowed attributes from objectClasses,
52 entirely removing objectClasses,
53 or any other change that may result in making perfectly valid entries
54 no longer compliant with the modified schema.
55 The execution of the
56 .B slapschema
57 tool after modifying the schema can point out
58 inconsistencies that would otherwise surface only when
59 inconsistent entries need to be modified.
60
61 .LP
62 The entry records are checked in database order, not superior first
63 order.  The entry records will be checked considering all
64 (user and operational) attributes stored in the database.
65 Dynamically generated attributes (such as subschemaSubentry)
66 will not be considered.
67 .SH OPTIONS
68 .TP
69 .BI \-a \ filter
70 Only check entries matching the asserted filter.
71 For example
72
73 slapschema \-a \\
74     "(!(entryDN:dnSubtreeMatch:=ou=People,dc=example,dc=com))"
75
76 will check all but the "ou=People,dc=example,dc=com" subtree
77 of the "dc=example,dc=com" database.
78 Deprecated; use \fB-H\fP \fIldap:///???(filter)\fP instead.
79 .TP
80 .BI \-b \ suffix 
81 Use the specified \fIsuffix\fR to determine which database to
82 check.  The \fB\-b\fP cannot be used in conjunction
83 with the
84 .B \-n
85 option.
86 .TP
87 .B \-c
88 Enable continue (ignore errors) mode.
89 .TP
90 .BI \-d \ debug-level
91 Enable debugging messages as defined by the specified
92 .IR debug-level ;
93 see
94 .BR slapd (8)
95 for details.
96 .TP
97 .BI \-f \ slapd.conf
98 Specify an alternative
99 .BR slapd.conf (5)
100 file.
101 .TP
102 .BI \-F \ confdir
103 specify a config directory.
104 If both
105 .B \-f
106 and
107 .B \-F
108 are specified, the config file will be read and converted to
109 config directory format and written to the specified directory.
110 If neither option is specified, an attempt to read the
111 default config directory will be made before trying to use the default
112 config file. If a valid config directory exists then the
113 default config file is ignored.
114 .TP
115 .B \-g
116 disable subordinate gluing.  Only the specified database will be
117 processed, and not its glued subordinates (if any).
118 .TP
119 .B \-H \ URI
120 use dn, scope and filter from URI to only handle matching entries.
121 .TP
122 .BI \-l \ error-file
123 Write errors to specified file instead of standard output.
124 .TP
125 .BI \-n \ dbnum
126 Check the \fIdbnum\fR\-th database listed in the
127 configuration file. The config database
128 .BR slapd\-config (5),
129 is always the first database, so use
130 .B \-n 0
131
132 The
133 .B \-n
134 cannot be used in conjunction with the
135 .B \-b
136 option.
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 .fi
151 .TP
152 .BI \-s \ subtree-dn
153 Only check entries in the subtree specified by this DN.
154 Implies \fB\-b\fP \fIsubtree-dn\fP if no
155 .B \-b
156 nor
157 .B \-n
158 option is given.
159 Deprecated; use \fB-H\fP \fIldap:///subtree-dn\fP instead.
160 .TP
161 .B \-v
162 Enable verbose mode.
163 .SH LIMITATIONS
164 For some backend types, your
165 .BR slapd (8)
166 should not be running (at least, not in read-write
167 mode) when you do this to ensure consistency of the database. It is
168 always safe to run 
169 .B slapschema
170 with the
171 .BR slapd\-bdb (5),
172 .BR slapd\-hdb (5),
173 and
174 .BR slapd\-null (5)
175 backends.
176 .SH EXAMPLES
177 To check the schema compliance of your SLAPD database after modifications
178 to the schema, and put any error in a file called
179 .BR errors.ldif ,
180 give the command:
181 .LP
182 .nf
183 .ft tt
184         SBINDIR/slapschema \-l errors.ldif
185 .ft
186 .fi
187 .SH "SEE ALSO"
188 .BR ldap (3),
189 .BR ldif (5),
190 .BR slapd (8)
191 .LP
192 "OpenLDAP Administrator's Guide" (http://www.OpenLDAP.org/doc/admin/)
193 .SH ACKNOWLEDGEMENTS
194 .so ../Project