]> git.sur5r.net Git - openldap/blob - doc/man/man8/slapschema.8
040be52269cbbcaef3b25aac5ef253c16a78fcd9
[openldap] / doc / man / man8 / slapschema.8
1 .TH SLAPSCHEMA 8C "RELEASEDATE" "OpenLDAP LDVERSION"
2 .\" Copyright 1998-2009 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 \-l error-file\fR]
25 [\c
26 .BI \-n dbnum\fR]
27 [\c
28 .BI \-o option\fR[ = value\FR]]
29 [\c
30 .BI \-s subtree-dn\fR]
31 [\c
32 .BR \-v ]
33 .LP
34 .SH DESCRIPTION
35 .LP
36 .B Slapschema
37 is used to check schema compliance of the contents of a
38 .BR slapd (8)
39 database.
40 It opens the given database determined by the database number or
41 suffix and checks the compliance of its contents with the corresponding
42 schema. Errors are written to standard output or the specified file.
43 Databases configured as
44 .B subordinate
45 of this one are also output, unless \fB\-g\fP is specified.
46 .LP
47 Administrators may need to modify existing schema items, including
48 adding new required attributes to objectClasses,
49 removing existing required or allowed attributes from objectClasses,
50 entirely removing objectClasses,
51 or any other change that may result in making perfectly valid entries
52 no longer compliant with the modified schema.
53 The execution of the
54 .B slapschema tool after modifying the schema can point out
55 inconsistencies that would otherwise surface only when
56 inconsistent entries need to be modified.
57
58 .LP
59 The entry records are checked in database order, not superior first
60 order.  The entry records will be checked considering all
61 (user and operational) attributes stored in the database.
62 Dynamically generated attributes (such as subschemaSubentry)
63 will not be considered.
64 .SH OPTIONS
65 .TP
66 .BI \-a \ filter
67 Only check entries matching the asserted filter.
68 For example
69
70 slapschema \-a \\
71     "(!(entryDN:dnSubtreeMatch:=ou=People,dc=example,dc=com))"
72
73 will check all but the "ou=People,dc=example,dc=com" subtree
74 of the "dc=example,dc=com" database.
75 .TP
76 .BI \-b \ suffix 
77 Use the specified \fIsuffix\fR to determine which database to
78 check.  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.
110 .TP
111 .B \-g
112 disable subordinate gluing.  Only the specified database will be
113 processed, and not its glued subordinates (if any).
114 .TP
115 .BI \-l \ error-file
116 Write errors to specified file instead of standard output.
117 .TP
118 .BI \-n \ dbnum
119 Check the \fIdbnum\fR\-th database listed in the
120 configuration file. The config database
121 .BR slapd\-config (5),
122 is always the first database, so use
123 .B \-n 0
124
125 The
126 .B \-n
127 cannot be used in conjunction with the
128 .B \-b
129 option.
130 .TP
131 .BI \-o \ option\fR[ = value\fR]
132 Specify an
133 .I option
134 with a(n optional)
135 .IR value .
136 Possible generic options/values are:
137 .LP
138 .nf
139               syslog=<subsystems>  (see `\-s' in slapd(8))
140               syslog\-level=<level> (see `\-S' in slapd(8))
141               syslog\-user=<user>   (see `\-l' in slapd(8))
142
143 .fi
144 .TP
145 .BI \-s \ subtree-dn
146 Only check entries in the subtree specified by this DN.
147 Implies \fB\-b\fP \fIsubtree-dn\fP if no
148 .B \-b
149 nor
150 .B \-n
151 option is given.
152 .TP
153 .B \-v
154 Enable verbose mode.
155 .SH LIMITATIONS
156 For some backend types, your
157 .BR slapd (8)
158 should not be running (at least, not in read-write
159 mode) when you do this to ensure consistency of the database. It is
160 always safe to run 
161 .B slapschema
162 with the
163 .BR slapd\-bdb (5),
164 .BR slapd\-hdb (5),
165 and
166 .BR slapd\-null (5)
167 backends.
168 .SH EXAMPLES
169 To check the schema compliance of your SLAPD database after modifications
170 to the schema, and put any error in a file called
171 .BR errors.ldif ,
172 give the command:
173 .LP
174 .nf
175 .ft tt
176         SBINDIR/slapcat \-l errors.ldif
177 .ft
178 .fi
179 .SH "SEE ALSO"
180 .BR ldap (3),
181 .BR ldif (5),
182 .BR slapd (8)
183 .LP
184 "OpenLDAP Administrator's Guide" (http://www.OpenLDAP.org/doc/admin/)
185 .SH ACKNOWLEDGEMENTS
186 .so ../Project