]> git.sur5r.net Git - openldap/blob - doc/man/man5/slapd.conf.5
Reimplement LDBM_SYNC/LDBM_NOSYNC code (dbnosync).
[openldap] / doc / man / man5 / slapd.conf.5
1 .TH SLAPD.CONF 5 "5 August 1999" "OpenLDAP LDVERSION"
2 .\" $OpenLDAP$
3 .\" Copyright 1998-1999 The OpenLDAP Foundation All Rights Reserved.
4 .\" Copying restrictions apply.  See COPYRIGHT/LICENSE.
5 .SH NAME
6 slapd.conf \- configuration file for slapd, the stand-alone LDAP daemon
7 .SH SYNOPSIS
8 ETCDIR/slapd.conf
9 .SH DESCRIPTION
10 The file
11 .B ETCDIR/slapd.conf
12 contains configuration information for the
13 .BR slapd (8)
14 daemon.  This configuration file is also used by the
15 .BR slurpd (8)
16 replication daemon and by the SLAPD tools
17 .BR slapadd (8),
18 .BR slapcat (8),
19 and
20 .BR slapindex (8).
21 .LP
22 The
23 .B slapd.conf
24 file consists of a series of global configuration options that apply to
25 .B slapd
26 as a whole (including all backends), followed by zero or more database
27 backend definitions that contain information specific to a backend
28 instance.
29 .LP
30 The general format of
31 .B slapd.conf
32 is as follows:
33 .LP
34 .nf
35     # comment - these options apply to every database
36     <global configuration options>
37     # first database definition & configuration options
38     database    <backend 1 type>
39     <configuration options specific to backend 1>
40     # subsequent database definitions & configuration options
41     ...
42 .fi
43 .LP
44 As many backend-specific sections as desired may be included.  Global
45 options can be overridden in a backend (for options that appear more
46 than once, the last appearance in the
47 .B slapd.conf
48 file is used).  Blank lines and comment lines beginning with a `#'
49 character are ignored. If a line begins with white space, it is
50 considered a continuation of the previous line.
51 .LP
52 Arguments on configuration lines are separated by white space. If an
53 argument contains white space, the argument should be enclosed in
54 double quotes.  If an argument contains a double quote (`"') or a
55 backslash character (`\\'), the character should be preceded by a
56 backslash character.
57 .LP
58 The specific configuration options available are discussed below in the
59 Global Configuration Options, General Backend Options, LDBM
60 Backend-Specific Options, Shell Backend-Specific Options, and Password
61 Backend-Specific Options sections.  Refer to "The SLAPD and SLURPD
62 Administrator's Guide" for more details on the slapd configuration
63 file.
64 .SH GLOBAL CONFIGURATION OPTIONS
65 Options described in this section apply to all backends, unless specifically 
66 overridden in a backend definition. Arguments that should be replaced by 
67 actual text are shown in brackets <>.
68 .TP
69 .B
70 access to <what> [ by <who> <accesslevel> ]+
71 Grant access (specified by <accesslevel>) to a set of entries and/or
72 attributes (specified by <what>) by one or more requestors (specified
73 by <who>).  Refer to "The SLAPD and SLURPD Administrator's Guide" for
74 information on using the
75 .B slapd
76 access-control mechanisms.
77 .TP
78 .B
79 attribute ( <oid> [NAME <name>] [DESC <description>] [OBSOLETE] \
80 [SUP <oid>] [EQUALITY <oid>] [ORDERING <oid>] [SUBSTR <oid>] \
81 [SYNTAX <oidlen>] [SINGLE-VALUE] [COLLECTIVE] [NO-USER-MODIFICATION] \
82 [USAGE <attributeUsage>] )
83 Specify an attribute type using the LDAPv3 syntax defined in RFC 2252.
84 This is the preferred format for attribute type definitions. The slapd
85 parser extends the RFC 2252 definition by allowing string forms as well
86 as numeric OIDs to be used for the attribute OID and attribute syntax OID.
87 (See the
88 .B
89 objectidentifier
90 description.) Currently the syntax name parser is case-sensitive.
91 The known syntax names are:
92 .RS
93 .RS
94 .PD 0
95 AttributeTypeDescription Audio Binary BitString Certificate CertificateList
96 CertificatePair DN DeliveryMethod DirectoryString DITContentRuleDescription
97 DITStructureRuleDescription EnhancedGuide FacsimileTelephoneNumber
98 GeneralizedTime Guide IA5String Integer MatchingRuleDescription
99 MatchingRuleUseDescription MailPreference NameAndOptionalUUID
100 NameFormDescription NumericString ObjectClassDescription OID
101 OtherMailbox OctetString PostalAddress ProtocolInformation
102 PresentationAddress PrintableString SupportedAlgorithm TelephoneNumber
103 TeletexTerminalIdentifier TelexNumber UTCTime LDAPSyntaxDescription
104 SubstringAssertion NISnetgrouptriple Bootparameter
105 .PD
106 .RE
107 .RE
108 .TP
109 .B 
110 attribute <name> [<name2>] { bin | ces | cis | tel | dn }
111 Associate a syntax with an attribute name. This directive is deprecated
112 in favor of the one above. By default, an 
113 attribute is assumed to have syntax
114 .BR cis .
115 An optional alternate name can be 
116 given for an attribute. The possible syntaxes and their meanings are:
117 .RS
118 .RS
119 .PD 0
120 .TP
121 .B bin
122 binary
123 .TP
124 .B ces
125 case exact string
126 .TP
127 .B cis
128 case ignore string
129 .TP
130 .B tel
131 telephone number string
132 .TP
133 .B dn
134 distinguished name
135 .PD
136 .RE
137 .RE
138 .TP
139 .B
140 defaultaccess [self]{ none | compare | search | read | write }
141 Specify the default access to grant requestors not matched by 
142 any other access line.  The default behavior is to grant read access.
143 .TP
144 .B idletimeout <integer>
145 Specify the number of seconds to wait before forcibly closing
146 an idle client connections.  A idletimeout of 0 disables this
147 feature.  The default is 0.
148 .TP
149 .B include <filename>
150 Read additional configuration information from the given file before
151 continuing with the next line of the current file.
152 .TP
153 .B pidfile <filename>
154 The ( absolute ) name of a file that will hold the 
155 .B slapd
156 server's process ID ( see
157 .BR getpid (2)
158 ) if started without the debugging command line option.
159 .TP
160 .B argsfile <filename>
161 The ( absolute ) name of a file that will hold the 
162 .B slapd
163 server's command line options
164 if started without the debugging command line option.
165 .TP
166 .B
167 locale { <locale-name> | on | off }
168 Obey <locale-name>'s character classification and case conversion; i.e. the
169 .BR locale (5)
170 LC_CTYPE category.  See
171 .BR locale (5)
172 for details about locales.  "on" takes the locale from the environment,
173 typically $LANG or $LC_CTYPE, and will only work properly if slapd will
174 run with the same environment variables as when the database was
175 generated.  "off" (the default setting) resets to the initial "C" locale.
176 .TP
177 .B loglevel <integer>
178 Specify the level at which debugging statements and operation 
179 statistics should be syslogged (currently logged to the
180 .BR syslogd (8) 
181 LOG_LOCAL4 facility).  Log levels are additive, and available levels
182 are:
183 .RS
184 .RS
185 .PD 0
186 .TP
187 .B 1
188 trace function calls
189 .TP
190 .B 2
191 debug packet handling
192 .TP
193 .B 4
194 heavy trace debugging
195 .TP
196 .B 8
197 connection management
198 .TP
199 .B 16
200 print out packets sent and received
201 .TP
202 .B 32
203 search filter processing
204 .TP
205 .B 64
206 configuration file processing
207 .TP
208 .B 128
209 access control list processing
210 .TP
211 .B 256
212 stats log connections/operations/results
213 .TP
214 .B 512
215 stats log entries sent
216 .TP
217 .B 1024
218 print communication with shell backends
219 .TP
220 .B 2048
221 entry parsing
222 .PD
223 .RE
224 .RE
225 .TP
226 .B
227 objectclass ( <oid> [NAME <name>] [DESC <description] [OBSOLETE] \
228 [SUP <oids>] [{ ABSTRACT | STRUCTURAL | AUXILIARY }] [MUST <oids>] \
229 [MAY <oids>] )
230 Specify an objectclass using the LDAPv3 syntax defined in RFC 2252.
231 This is the preferred format for object class definitions. The slapd
232 parser extends the RFC 2252 definition by allowing string forms as well
233 as numeric OIDs to be used for the object class OID. (See the
234 .B
235 objectidentifier
236 description.) Object classes are "STRUCTURAL" by default.
237 .TP
238 .B
239 objectclass <name> requires <attrs> allows <attrs>
240 Define the schema rules for the object class named <name>.  These are
241 used in conjunction with the schemacheck option. This directive is
242 deprecated in favor of the one above.
243 .TP
244 .B objectidentifier <name> { <oid> | <name>[:<suffix>] }
245 Define a string name that equates to the given OID. The string can be used
246 in place of the numeric OID in objectclass and attribute definitions. The
247 name can also be used with a suffix of the form ":xx" in which case the
248 value "oid.xx" will be used.
249 .TP
250 .B referral <url>
251 Specify the referral to pass back when
252 .BR slapd (8)
253 cannot find a local database to handle a request.
254 If specified multiple times, each url is provided.
255 .TP
256 .B schemacheck { on | off }
257 Turn schema checking on or off. The default is on.
258 .TP
259 .B sizelimit <integer>
260 Specify the maximum number of entries to return from a search operation.
261 The default size limit is 500.
262 .TP
263 .B srvtab <filename>
264 Specify the srvtab file in which the kerberos keys necessary for
265 authenticating clients using kerberos can be found. This option is only
266 meaningful if you are using Kerberos authentication.
267 .TP
268 .B timelimit <integer>
269 Specify the maximum number of seconds (in real time)
270 .B slapd
271 will spend answering a search request.  The default time limit is 3600.
272 .SH TLS OPTIONS
273 If
274 .B slapd
275 is build with support for Transport Layer Security, there are more options
276 you can specify.
277 .TP
278 .B TLSCipherSuite <cipher-suite-spec>
279 Permits configuring what ciphers will be accepted and the preference order.
280 <cipher-suite-spec> should be a cipher specification for OpenSSL.  Example:
281
282 TLSCipherSuite HIGH:MEDIUM:+SSLv2
283
284 To check what ciphers a given spec selects, use:
285
286 openssl ciphers -v <cipher-suite-spec>
287 .TP
288 .B TLSCertificateFile <filename>
289 Specifies the file that contains the
290 .B slapd
291 server certificate.
292 .TP
293 .B TLSCertificateKeyFile <filename>
294 Specifies the file that contains the
295 .B slapd
296 server private key that matches the certificate stored in the
297 .B TLSCertificateFile
298 file.  Currently, the private key must not be protected with a password, so
299 it is of critical importance that it is protected carefully. 
300 .SH GENERAL BACKEND OPTIONS
301 Options in this section only apply to the configuration file section
302 for the backend in which they are defined.  They are supported by every
303 type of backend.
304 .TP
305 .B database <databasetype>
306 Mark the beginning of a new database instance definition. <databasetype>
307 should be one of
308 .B ldbm,
309 .B shell,
310 or
311 .B passwd
312 depending on which backend will serve the database.
313 .TP
314 .B lastmod on | off
315 Controls whether
316 .B slapd
317 will automatically maintain the 
318 modifiersName, modifyTimestamp, creatorsName, and 
319 createTimestamp attributes for entries.  By default, lastmod is on.
320 .TP
321 .B readonly on | off
322 This option puts the database into "read-only" mode.  Any attempts to 
323 modify the database will return an "unwilling to perform" error.  By
324 default, readonly is off.
325 .TP
326 .B
327 replica host=<hostname>[:port] "binddn=<DN>" bindmethod=simple |
328 .B
329 kerberos [credentials=<password>] [srvtab=<filename>]
330 .br
331 Specify a replication site for this database.  Refer to "The SLAPD and
332 SLURPD Administrator's Guide" for detailed information on setting up
333 a replicated
334 .B slapd
335 directory service.
336 .TP
337 .B replogfile <filename>
338 Specify the name of the replication log file to log changes to.  
339 The replication log is typically written by
340 .BR slapd (8)
341 and read by
342 .BR slurpd (8).
343 See
344 .BR slapd.replog (5)
345 for more information.
346 .TP
347 .B rootdn <dn>
348 Specify the DN of an entry that is not subject to access control 
349 or administrative limit restrictions for operations on this database.
350 .TP
351 .B rootpw <password>
352 Specify a password (or hash of the password) for the rootdn.
353 This option accepts all password formats known to the server
354 including \fB{SHA}\fP, \fB{MD5}\fP, \fB{CRYPT}\fP, and cleartext.  
355 Cleartext passwords are not recommended.
356 .TP
357 .B suffix <dn suffix>
358 Specify the DN suffix of queries that will be passed to this 
359 backend database.  Multiple suffix lines can be given and at least one is 
360 required for each database definition.
361 .TP
362 .B updatedn <dn>
363 This option is only applicable in a slave
364 .B slapd.
365 It specifies the DN allowed to make changes to the replica (typically,
366 this is the DN
367 .BR slurpd (8)
368 binds as when making changes to the replica).
369 .TP
370 .B updateref <url>
371 Specify the referral to pass back when
372 .BR slapd (8)
373 is asked to modify a replicated local database.
374 If specified multiple times, each url is provided.
375 .SH LDBM BACKEND-SPECIFIC OPTIONS
376 Options in this category only apply to the LDBM backend database. That is,
377 they must follow a "database ldbm" line and come before any subsequent
378 "database" lines.  The LDBM backend is a high-performance database that
379 makes extensive use of indexing and caching to speed data access. 
380 .TP
381 .B cachesize <integer>
382 Specify the size in entries of the in-memory cache maintained 
383 by the LDBM backend database instance.  The default is 1000 entries.
384 .TP
385 .B dbcachesize <integer>
386 Specify the size in bytes of the in-memory cache associated 
387 with each open index file. If not supported by the underlying database 
388 method, this option is ignored without comment.  The default is 100000 bytes.
389 .TP
390 .B dbnolocking
391 Specify that no database locking should be performed.  
392 Enabling this option may improve performance at the expense of data security.
393 .B dbnosync
394 Specify that on-disk database contents should not be immediately
395 synchronized with in memory changes.  Enabling this option may improve
396 performance at the expense of data security.
397 .TP
398 .B directory <directory>
399 Specify the directory where the LDBM files containing the database and
400 associated indexes live.  The default is
401 .B /usr/tmp.
402 .TP
403 .B
404 index { <attrlist> | default } [ pres,eq,approx,sub,none ]
405 Specify the indexes to maintain for the given attribute. If only 
406 an <attr> is given, all possible indexes are maintained.
407 .TP
408 .B mode <integer>
409 Specify the file protection mode that newly created database 
410 index files should have.  The default is 0600.
411 .SH SHELL BACKEND-SPECIFIC OPTIONS
412 Options in this category only apply to the SHELL backend database. That is,
413 they must follow a "database shell" line and come before any subsequent
414 "database" lines.  The Shell backend executes external programs to
415 implement operations, and is designed to make it easy to tie an existing
416 database to the
417 .B slapd
418 front-end.
419 .TP
420 .B bind <pathname>
421 .TP
422 .B unbind <pathname>
423 .TP
424 .B search <pathname>
425 .TP
426 .B compare <pathname>
427 .TP
428 .B modify <pathname>
429 .TP
430 .B modrdn <pathname>
431 .TP
432 .B add <pathname>
433 .TP
434 .B delete <pathname>
435 .TP
436 .B abandon <pathname>
437 These options specify the pathname of the command to execute in response 
438 to the given LDAP operation. The command given should understand and 
439 follow the input/output conventions described in Appendix B of "The SLAPD
440 and SLURPD Administrator's Guide."
441 .LP
442 Note that you need only supply configuration lines for those commands you
443 want the backend to handle. Operations for which a command is not
444 supplied will be refused with an "unwilling to perform" error.
445 .SH PASSWORD BACKEND-SPECIFIC OPTIONS
446 Options in this category only apply to the PASSWD backend database.
447 That is, they must follow a "database passwd" line and come before any
448 subsequent "database" lines.  The PASSWD database serves up the user
449 account information listed in the system
450 .BR passwd (5)
451 file.
452 .TP
453 .B file <filename>
454 Specifies an alternate passwd file to use.  The default is
455 .B /etc/passwd.
456 .SH EXAMPLE
457 "The SLAPD and SLURPD Administrator's Guide" contains an annotated
458 example of a configuration file.
459 .SH FILES
460 ETCDIR/slapd.conf
461 .SH SEE ALSO
462 .BR ldap (3),
463 .BR slapd.replog (5),
464 .BR locale (5),
465 .BR passwd (5),
466 .BR slapd (8),
467 .BR slapadd (8),
468 .BR slapcat (8),
469 .BR slapindex (8),
470 .BR slurpd (8),
471 .LP
472 "The SLAPD and SLURPD Administrator's Guide"
473 .SH ACKNOWLEDGEMENTS
474 .B      OpenLDAP
475 is developed and maintained by The OpenLDAP Project (http://www.openldap.org/).
476 .B      OpenLDAP
477 is derived from University of Michigan LDAP 3.3 Release.