]> git.sur5r.net Git - openldap/blob - doc/man/man8/slapschema.8
Merge remote branch 'origin/mdb.master'
[openldap] / doc / man / man8 / slapschema.8
1 .TH SLAPSCHEMA 8C "RELEASEDATE" "OpenLDAP LDVERSION"
2 .\" Copyright 1998-2011 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 tool after modifying the schema can point out
57 inconsistencies that would otherwise surface only when
58 inconsistent entries need to be modified.
59
60 .LP
61 The entry records are checked in database order, not superior first
62 order.  The entry records will be checked considering all
63 (user and operational) attributes stored in the database.
64 Dynamically generated attributes (such as subschemaSubentry)
65 will not be considered.
66 .SH OPTIONS
67 .TP
68 .BI \-a \ filter
69 Only check entries matching the asserted filter.
70 For example
71
72 slapschema \-a \\
73     "(!(entryDN:dnSubtreeMatch:=ou=People,dc=example,dc=com))"
74
75 will check all but the "ou=People,dc=example,dc=com" subtree
76 of the "dc=example,dc=com" database.
77 Deprecated; use \fB-H\fP \fIldap:///???(filter)\fP instead.
78 .TP
79 .BI \-b \ suffix 
80 Use the specified \fIsuffix\fR to determine which database to
81 check.  The \fB\-b\fP cannot be used in conjunction
82 with the
83 .B \-n
84 option.
85 .TP
86 .B \-c
87 Enable continue (ignore errors) mode.
88 .TP
89 .BI \-d \ debug-level
90 Enable debugging messages as defined by the specified
91 .IR debug-level ;
92 see
93 .BR slapd (8)
94 for details.
95 .TP
96 .BI \-f \ slapd.conf
97 Specify an alternative
98 .BR slapd.conf (5)
99 file.
100 .TP
101 .BI \-F \ confdir
102 specify a config directory.
103 If both
104 .B \-f
105 and
106 .B \-F
107 are specified, the config file will be read and converted to
108 config directory format and written to the specified directory.
109 If neither option is specified, an attempt to read the
110 default config directory will be made before trying to use the default
111 config file. If a valid config directory exists then the
112 default config file is ignored.
113 .TP
114 .B \-g
115 disable subordinate gluing.  Only the specified database will be
116 processed, and not its glued subordinates (if any).
117 .TP
118 .B \-H \ URI
119 use dn, scope and filter from URI to only handle matching entries.
120 .TP
121 .BI \-l \ error-file
122 Write errors to specified file instead of standard output.
123 .TP
124 .BI \-n \ dbnum
125 Check the \fIdbnum\fR\-th database listed in the
126 configuration file. The config database
127 .BR slapd\-config (5),
128 is always the first database, so use
129 .B \-n 0
130
131 The
132 .B \-n
133 cannot be used in conjunction with the
134 .B \-b
135 option.
136 .TP
137 .BI \-o \ option\fR[ = value\fR]
138 Specify an
139 .I option
140 with a(n optional)
141 .IR value .
142 Possible generic options/values are:
143 .LP
144 .nf
145               syslog=<subsystems>  (see `\-s' in slapd(8))
146               syslog\-level=<level> (see `\-S' in slapd(8))
147               syslog\-user=<user>   (see `\-l' in slapd(8))
148
149 .fi
150 .TP
151 .BI \-s \ subtree-dn
152 Only check entries in the subtree specified by this DN.
153 Implies \fB\-b\fP \fIsubtree-dn\fP if no
154 .B \-b
155 nor
156 .B \-n
157 option is given.
158 Deprecated; use \fB-H\fP \fIldap:///subtree-dn\fP instead.
159 .TP
160 .B \-v
161 Enable verbose mode.
162 .SH LIMITATIONS
163 For some backend types, your
164 .BR slapd (8)
165 should not be running (at least, not in read-write
166 mode) when you do this to ensure consistency of the database. It is
167 always safe to run 
168 .B slapschema
169 with the
170 .BR slapd\-bdb (5),
171 .BR slapd\-hdb (5),
172 and
173 .BR slapd\-null (5)
174 backends.
175 .SH EXAMPLES
176 To check the schema compliance of your SLAPD database after modifications
177 to the schema, and put any error in a file called
178 .BR errors.ldif ,
179 give the command:
180 .LP
181 .nf
182 .ft tt
183         SBINDIR/slapcat \-l errors.ldif
184 .ft
185 .fi
186 .SH "SEE ALSO"
187 .BR ldap (3),
188 .BR ldif (5),
189 .BR slapd (8)
190 .LP
191 "OpenLDAP Administrator's Guide" (http://www.OpenLDAP.org/doc/admin/)
192 .SH ACKNOWLEDGEMENTS
193 .so ../Project