]> git.sur5r.net Git - openldap/blob - doc/man/man5/slapd.conf.5
Generate man page date from version.sh
[openldap] / doc / man / man5 / slapd.conf.5
1 .TH SLAPD.CONF 5 "RELEASEDATE" "OpenLDAP LDVERSION"
2 .\" Copyright 1998-2002 The OpenLDAP Foundation All Rights Reserved.
3 .\" Copying restrictions apply.  See COPYRIGHT/LICENSE.
4 .\" $OpenLDAP$
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, and General Database
60 Options.  Backend-specific options are discussed in the
61 .B slapd-<backend>(5)
62 manual pages.  Refer to the "OpenLDAP Administrator's Guide" for more
63 details on the slapd configuration 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 access to <what> "[ by <who> <access> <control> ]+"
70 Grant access (specified by <access>) to a set of entries and/or
71 attributes (specified by <what>) by one or more requestors (specified
72 by <who>).
73 See
74 .BR slapd.access (5)
75 and the "OpenLDAP's Administrator's Guide" for details.
76 .TP
77 .B allow <features>
78 Specify a set of features (separated by white space) to
79 allow (default none).
80 .B bind_v2
81 allows acceptance of LDAPv2 bind requests.
82 .B bind_anon_cred
83 allows anonymous bind when credentials are not empty (e.g.
84 when DN is empty).
85 .B bind_anon_dn
86 allows unauthenticated (anonymous) bind when DN is not empty.
87 .TP
88 .B argsfile <filename>
89 The ( absolute ) name of a file that will hold the 
90 .B slapd
91 server's command line options
92 if started without the debugging command line option.
93 .HP
94 .hy 0
95 .B attributetype "(\ <oid> [NAME\ <name>] [OBSOLETE]\
96  [DESC\ <description>]\
97  [SUP\ <oid>] [EQUALITY\ <oid>] [ORDERING\ <oid>]\
98  [SUBSTR\ <oid>] [SYNTAX\ <oidlen>] [SINGLE\-VALUE] [COLLECTIVE]\
99  [NO\-USER\-MODIFICATION] [USAGE\ <attributeUsage>]\ )"
100 .RS
101 Specify an attribute type using the LDAPv3 syntax defined in RFC 2252.
102 The slapd parser extends the RFC 2252 definition by allowing string
103 forms as well as numeric OIDs to be used for the attribute OID and
104 attribute syntax OID.
105 (See the
106 .B objectidentifier
107 description.) Currently the syntax name parser is case-sensitive.
108 The known syntax names are:
109 .RS
110 .RS
111 .PD 0
112 AttributeTypeDescription Audio Binary BitString Certificate CertificateList
113 CertificatePair DN DeliveryMethod DirectoryString DITContentRuleDescription
114 DITStructureRuleDescription EnhancedGuide FacsimileTelephoneNumber
115 GeneralizedTime Guide IA5String Integer MatchingRuleDescription
116 MatchingRuleUseDescription MailPreference NameAndOptionalUUID
117 NameFormDescription NumericString ObjectClassDescription OID
118 OtherMailbox OctetString PostalAddress ProtocolInformation
119 PresentationAddress PrintableString SupportedAlgorithm TelephoneNumber
120 TeletexTerminalIdentifier TelexNumber UTCTime LDAPSyntaxDescription
121 SubstringAssertion NISnetgrouptriple Bootparameter
122 .PD
123 .RE
124 .RE
125 .RE
126 .TP
127 .B concurrency <integer>
128 Specify a desired level of concurrency.  Provided to the underlying
129 thread system as a hint.  The default is not to provide any hint.
130 .\".TP
131 .\".B debug <subsys> <level>
132 .\"Specify a logging level for a particular subsystem.  The subsystems include
133 .\".B global
134 .\"a global level for all subsystems,
135 .\".B acl
136 .\"the ACL engine,
137 .\".B backend
138 .\"the backend databases,
139 .\".B cache
140 .\"the entry cache manager,
141 .\".B config
142 .\"the config file reader,
143 .\".B connection
144 .\"the connection manager,
145 .\".B cyrus
146 .\"the Cyrus SASL library interface,
147 .\".B filter
148 .\"the search filter processor,
149 .\".B getdn
150 .\"the DN normalization library,
151 .\".B index
152 .\"the database indexer,
153 .\".B liblber
154 .\"the ASN.1 BER library,
155 .\".B module
156 .\"the dynamic module loader,
157 .\".B operation
158 .\"the LDAP operation processors,
159 .\".B sasl
160 .\"the SASL authentication subsystem,
161 .\".B schema
162 .\"the schema processor, and
163 .\".B tls
164 .\"the TLS library interface. This is not an exhaustive list; there are many
165 .\"other subsystems and more are added over time.
166 .\"
167 .\"The levels are, in order of decreasing priority:
168 .\".B emergency, alert, critical, error, warning, notice, information, entry,
169 .\".B args, results, detail1, detail2
170 .\"An integer may be used instead, with 0 corresponding to
171 .\".B emergency
172 .\"up to 11 for
173 .\".BR detail2 .
174 .\"The
175 .\".B entry
176 .\"level logs function entry points,
177 .\".B args
178 .\"adds function call parameters, and
179 .\".B results
180 .\"adds the function results to the logs.
181 .\"The
182 .\".B detail1
183 .\"and
184 .\".B detail2
185 .\"levels add even more low level detail from individual functions.
186 .TP
187 .B defaultsearchbase <dn>
188 Specify a default search base to use when client submits a
189 non-base search request with an empty base DN.
190 .TP
191 .B disallow <features>
192 Specify a set of features (separated by white space) to
193 disallow (default none).
194 .B bind_anon
195 disables acceptance of anonymous bind requests.
196 .B bind_simple
197 disables simple (bind) authentication.
198 .B bind_krbv4
199 disables Kerberos V4 (bind) authentication.
200 .B tls_2_anon
201 disables Start TLS from forcing session to anonymous status (see also
202 .BR tls_authc ).
203 .B tls_authc
204 disables StartTLS if authenticated (see also
205 .BR tls_2_anon ).
206 .TP
207 .B gentlehup { on | off }
208 A SIGHUP signal will only cause a 'gentle' shutdown-attempt:
209 .B Slapd
210 will stop listening for new connections, but will not close the
211 connections to the current clients.  Future write operations return
212 unwilling-to-perform, though.  Slapd terminates when all clients
213 have closed their connections (if they ever do), or \- as before \-
214 if it receives a SIGTERM signal.  This can be useful if you wish to
215 terminate the server and start a new
216 .B slapd
217 server
218 .B with another database,
219 without disrupting the currently active clients.
220 The default is off.  You may wish to use
221 .B idletimeout
222 along with this option.
223 .TP
224 .B idletimeout <integer>
225 Specify the number of seconds to wait before forcibly closing
226 an idle client connection.  A idletimeout of 0 disables this
227 feature.  The default is 0.
228 .TP
229 .B include <filename>
230 Read additional configuration information from the given file before
231 continuing with the next line of the current file.
232 .TP
233 .B limits <who> <limit> [<limit> [...]]
234 Specify time and size limits based on who initiated an operation.
235 The argument
236 .B who
237 can be any of
238 .RS
239 .RS
240 .TP
241 anonymous | users | [dn[.<style>]=]<pattern>
242
243 .RE
244 with
245 .RS
246 .TP
247 <style> ::= exact | base | one | subtree | children | regex | anonymous
248
249 .RE
250 .B Anonymous
251 is hit when a search is performed without prior binding;
252 .B users
253 is hit when a search is performed by a successfully bound user;
254 otherwise a
255 .B regex
256 dn pattern is assumed unless otherwise specified by qualifying 
257 the (optional) key string
258 .B dn
259 with 
260 .B exact
261 or
262 .B base
263 (which are synonims), to require an exact match; with
264 .BR one, 
265 to require exactly one level of depth match; with
266 .BR subtree,
267 to allow any level of depth match, including the exact match; with
268 .BR children,
269 to allow any level of depth match, not including the exact match;
270 .BR regex
271 explicitly requires the (default) match based on regular expression
272 pattern, as detailed in
273 .BR regex (7).
274 Finally,
275 .B anonymous
276 matches unbound operations; the 
277 .B pattern
278 field is ignored.
279 The same behavior is obtained by using the 
280 .B anonymous
281 form of the
282 .B who
283 clause.
284
285 The currently supported limits are 
286 .B size
287 and 
288 .BR time.
289
290 The syntax for time limits is 
291 .BR time[.{soft|hard}]=<integer> ,
292 where 
293 .BR integer
294 is the number of seconds slapd will spend answering a search request.
295 If no time limit is explicitly requested by the client, the 
296 .BR soft
297 limit is used; if the requested time limit exceedes the
298 .BR hard
299 limit, an "Unwilling to perform" is returned.
300 If the
301 .BR hard
302 limit is set to 0 or to the keyword "soft", the soft limit is used 
303 in either case; if it is set to -1 or to the keyword "none", 
304 no hard limit is enforced.
305 Explicit requests for time limits smaller or equal to the
306 .BR hard 
307 limit are honored.
308 If no flag is set, the value is assigned to the 
309 .BR soft 
310 limit, and the
311 .BR hard
312 limit is set to zero, to preserve the original behavior.
313
314 The syntax for size limits is
315 .BR size[.{soft|hard|unchecked}]=<integer> ,
316 where
317 .BR integer
318 is the maximum number of entries slapd will return answering a search 
319 request.
320 If no size limit is explicitly requested by the client, the
321 .BR soft
322 limit is used; if the requested size limit exceedes the
323 .BR hard
324 limit, an "Unwilling to perform" is returned.
325 If the 
326 .BR hard
327 limit is set to 0 or to the keyword "soft", the soft limit is used 
328 in either case; if it is set to -1 or to the keyword "none", 
329 no hard limit is enforced.
330 Explicit requests for size limits smaller or equal to the
331 .BR hard
332 limit are honored.
333 The
334 .BR unchecked
335 flag sets a limit on the number of candidates a search request is allowed
336 to examine.
337 If the selected candidates exceed the 
338 .BR unchecked
339 limit, the search will abort with "Unwilling to perform".
340 If it is set to -1 or to the keyword "none", no limit is applied (the default).
341 If no flag is set, the value is assigned to the
342 .BR soft 
343 limit, and the
344 .BR hard
345 limit is set to zero, to preserve the original behavior.
346
347 In case of no match, the global limits are used.
348 The default values are the same of
349 .BR sizelimit
350 and
351 .BR timelimit ;
352 no limit is set on 
353 .BR unchecked .
354 .RE
355 .\".TP
356 .\".B logfile <filename>
357 .\"Specify a file for recording debug log messages. By default these messages
358 .\"only go to stderr and are not recorded anywhere else. Specifying a logfile
359 .\"copies messages to both stderr and the logfile.
360 .TP
361 .B loglevel <integer>
362 Specify the level at which debugging statements and operation 
363 statistics should be syslogged (currently logged to the
364 .BR syslogd (8) 
365 LOG_LOCAL4 facility).  Log levels are additive, and available levels
366 are:
367 .RS
368 .RS
369 .PD 0
370 .TP
371 .B 1
372 trace function calls
373 .TP
374 .B 2
375 debug packet handling
376 .TP
377 .B 4
378 heavy trace debugging
379 .TP
380 .B 8
381 connection management
382 .TP
383 .B 16
384 print out packets sent and received
385 .TP
386 .B 32
387 search filter processing
388 .TP
389 .B 64
390 configuration file processing
391 .TP
392 .B 128
393 access control list processing
394 .TP
395 .B 256
396 stats log connections/operations/results
397 .TP
398 .B 512
399 stats log entries sent
400 .TP
401 .B 1024
402 print communication with shell backends
403 .TP
404 .B 2048
405 entry parsing
406 .PD
407 .RE
408 .RE
409 .TP
410 .B moduleload <filename>
411 Specify the name of a dynamically loadable module to load. The filename
412 may be an absolute path name or a simple filename. Non-absolute names
413 are searched for in the directories specified by the
414 .B modulepath
415 option. This option and the
416 .B modulepath
417 option are only usable if slapd was compiled with --enable-modules.
418 .TP
419 .B modulepath <pathspec>
420 Specify a list of directories to search for loadable modules. Typically
421 the path is colon-separated but this depends on the operating system.
422 .HP
423 .B objectclass "( <oid> [NAME <name>] [DESC <description] [OBSOLETE]\
424  [SUP <oids>] [{ ABSTRACT | STRUCTURAL | AUXILIARY }] [MUST <oids>]\
425  [MAY <oids>] )"
426 .RS
427 Specify an objectclass using the LDAPv3 syntax defined in RFC 2252.
428 The slapd parser extends the RFC 2252 definition by allowing string
429 forms as well as numeric OIDs to be used for the object class OID.
430 (See the
431 .B
432 objectidentifier
433 description.)  Object classes are "STRUCTURAL" by default.
434 .RE
435 .TP
436 .B objectidentifier <name> "{ <oid> | <name>[:<suffix>] }"
437 Define a string name that equates to the given OID. The string can be used
438 in place of the numeric OID in objectclass and attribute definitions. The
439 name can also be used with a suffix of the form ":xx" in which case the
440 value "oid.xx" will be used.
441 .TP
442 .B password-hash <hash>
443 This option sets the hash to be used in generation of user
444 passwords, stored in userPassword, during processing of
445 LDAP Password Modify Extended Operations (RFC 3052).
446 The <hash> must be one of
447 .BR {SSHA} ,
448 .BR {SHA} ,
449 .BR {SMD5} ,
450 .BR {MD5} ,
451 .BR {CRYPT} ,
452 and
453 .BR {CLEARTEXT} .
454 The default is
455 .BR {SSHA} .
456
457 Note that
458 .B {CLEARTEXT}
459 indicates that the new password should be
460 added to userPassword as clear text.
461
462 Also, note that this option does not alter the normal user applications
463 handling of userPassword during LDAP Add, Modify, or other LDAP operations.
464 .TP
465 .B password\-crypt\-salt\-format <format>
466 Specify the format of the salt passed to
467 .BR crypt (3)
468 when generating {CRYPT} passwords (see
469 .BR password\-hash )
470 during processing of LDAP Password Modify Extended Operations (RFC 3062).
471
472 This string needs to be in
473 .BR sprintf (3)
474 format and may include one (and only one) %s conversion.
475 This conversion will be substituted with a string random
476 characters from [A\-Za\-z0\-9./].  For example, "%.2s"
477 provides a two character salt and "$1$%.8s" tells some
478 versions of crypt(3) to use an MD5 algorithm and provides
479 8 random characters of salt.  The default is "%s", which
480 provides 31 characters of salt.
481 .TP
482 .B pidfile <filename>
483 The ( absolute ) name of a file that will hold the 
484 .B slapd
485 server's process ID ( see
486 .BR getpid (2)
487 ) if started without the debugging command line option.
488 .TP
489 .B referral <url>
490 Specify the referral to pass back when
491 .BR slapd (8)
492 cannot find a local database to handle a request.
493 If specified multiple times, each url is provided.
494 .TP
495 .B require <conditions>
496 Specify a set of conditions (separated by white space) to
497 require (default none).
498 The directive may be specified globally and/or per-database.
499 .B bind
500 requires bind operation prior to directory operations.
501 .B LDAPv3
502 requires session to be using LDAP version 3.
503 .B authc
504 requires authentication prior to directory operations.
505 .B SASL
506 requires SASL authentication prior to directory operations.
507 .B strong
508 requires strong authentication prior to directory operations.
509 The
510 .B SASL
511 and
512 .B strong
513 conditions are currently same.
514 .B none
515 may be used to require no conditions (useful for clearly globally
516 set conditions within a particular database).
517 .TP
518 .B reverse-lookup on | off
519 Enable/disable client name reverse lookup (default is 
520 .BR on 
521 if compiled with --enable-rlookups).
522 .TP
523 .B rootDSE <file>
524 Specify the name of an LDIF(5) file containing user defined attributes
525 for the root DSE.  These attributes are returned in addition to the
526 attributes normally produced by slapd.
527 .TP
528 .B sasl-host <fqdn>
529 Used to specify the fully qualified domain name used for SASL processing.
530 .TP
531 .B sasl-realm <realm>
532 Specify SASL realm.  Default is empty.
533 .TP
534 .B sasl-regexp <match> <replace>
535 Used by the SASL authorization mechanism to convert a SASL authenticated 
536 username to an LDAP DN. When an authorization request is received, the SASL 
537 .B USERNAME, REALM, 
538 and
539 .B MECHANISM
540 are taken, when available, and combined into a SASL name of the 
541 form
542 .RS
543 .RS
544 .TP
545 .B uid=<username>[,cn=<realm>],cn=<mechanism>,cn=auth
546
547 .RE
548 This SASL name is then compared against the
549 .B match
550 regular expression, and if the match is successful, the SASL name is
551 replaced with the
552 .B replace
553 string. If there are wildcard strings in the 
554 .B match
555 regular expression that are enclosed in parenthesis, e.g. 
556 .RS
557 .RS
558 .TP
559 .B uid=(.*),cn=.*
560
561 .RE
562 .RE
563 then the portion of the SASL name that matched the wildcard will be stored
564 in the numbered placeholder variable $1. If there are other wildcard strings
565 in parenthesis, the matching strings will be in $2, $3, etc. up to $9. The 
566 placeholders can then be used in the 
567 .B replace
568 string, e.g. 
569 .RS
570 .RS
571 .TP
572 .B cn=$1,ou=Accounts,dc=$2,dc=$4. 
573
574 .RE
575 .RE
576 The replaced SASL name can be either a DN or an LDAP URI. If the latter, the slapd
577 server will use the URI to search its own database, and if the search returns 
578 exactly one entry, the SASL name is replaced by the DN of that entry.
579 Multiple 
580 .B sasl-regexp 
581 options can be given in the configuration file to allow for multiple matching 
582 and replacement patterns. The matching patterns are checked in the order they 
583 appear in the file, stopping at the first successful match.
584
585 .\".B Caution:
586 .\"Because the plus sign + is a character recognized by the regular expression engine,
587 .\"and it will appear in SASL names that include a REALM, be careful to escape the
588 .\"plus sign with a backslash \\+ to remove the character's special meaning.
589 .RE
590 .TP
591 .B sasl-secprops <properties>
592 Used to specify Cyrus SASL security properties.
593 The
594 .B none
595 flag (without any other properities) causes the flag properites
596 default, "noanonymous,noplain", to be cleared.
597 The
598 .B noplain
599 flag disables mechanisms susceptible to simple passive attacks.
600 The
601 .B noactive
602 flag disables mechanisms susceptible to active attacks.
603 The
604 .B nodict
605 flag disables mechanisms susceptible to passive dictionary attacks.
606 The
607 .B noanonyous
608 flag disables mechanisms which support anonymous login.
609 The
610 .B forwardsec
611 flag require forward secrecy between sessions.
612 The
613 .B passcred
614 require mechanisms which pass client credentials (and allow
615 mechanisms which can pass credentials to do so).
616 The
617 .B minssf=<factor> 
618 property specifies the minimum acceptable
619 .I security strength factor
620 as an integer approximate to effective key length used for
621 encryption.  0 (zero) implies no protection, 1 implies integrity
622 protection only, 56 allows DES or other weak ciphers, 112
623 allows triple DES and other strong ciphers, 128 allows RC4,
624 Blowfish and other modern strong ciphers.  The default is 0.
625 The
626 .B maxssf=<factor> 
627 property specifies the maximum acceptable
628 .I security strength factor
629 as an integer (see minssf description).  The default is INT_MAX.
630 The
631 .B maxbufsize=<size> 
632 property specifies the maximum security layer receive buffer
633 size allowed.  0 disables security layers.  The default is 65536.
634 .TP
635 .B security <factors>
636 Specify a set of factors (separated by white space) to require.
637 An integer value is associated with each factor and is roughly
638 equivalent of the encryption key length to require.  A value
639 of 112 is equivalent to 3DES, 128 to Blowfish, etc..
640 The directive may be specified globally and/or per-database.
641 .B ssf=<n>
642 specifies the overall security strength factor.
643 .B transport=<n>
644 specifies the transport security strength factor.
645 .B tls=<n>
646 specifies the TLS security strength factor.
647 .B sasl=<n>
648 specifies the SASL security strength factor.
649 .B update_ssf=<n>
650 specifies the overall security strength factor to require for
651 directory updates.
652 .B update_transport=<n>
653 specifies the transport security strength factor to require for
654 directory updates.
655 .B update_tls=<n>
656 specifies the TLS security strength factor to require for
657 directory updates.
658 .B update_sasl=<n>
659 specifies the SASL security strength factor to require for
660 directory updates.
661 Note that the
662 .B transport
663 factor is measure of security provided by the underlying transport,
664 e.g. ldapi:// (and eventually IPSEC).  It is not normally used.
665 .TP
666 .B sizelimit <integer> 
667 .TP
668 .B sizelimit size[.{soft|hard|unchecked}]=<integer> [...]
669 Specify the maximum number of entries to return from a search operation.
670 The default size limit is 500.
671 The second format allows a fine grain setting of the size limits.
672 Extra args can be added on the same line.
673 See
674 .BR limits
675 for an explanation of the different flags.
676 .TP
677 .B sockbuf_max_incoming <integer>
678 Specify the maximum incoming LDAP PDU size for anonymous sessions.
679 The default is 262143.
680 .TP
681 .B sockbuf_max_incoming_auth <integer>
682 Specify the maximum incoming LDAP PDU size for authenticated sessions.
683 The default is 4194303.
684 .TP
685 .B srvtab <filename>
686 Specify the srvtab file in which the kerberos keys necessary for
687 authenticating clients using kerberos can be found. This option is only
688 meaningful if you are using Kerberos authentication.
689 .TP
690 .B threads <integer>
691 Specify the maximum size of the primary thread pool.
692 The default is 32.
693 .TP
694 .B timelimit <integer>
695 .TP
696 .B timelimit time[.{soft|hard}]=<integer> [...]
697 Specify the maximum number of seconds (in real time)
698 .B slapd
699 will spend answering a search request.  The default time limit is 3600.
700 The second format allows a fine grain setting of the time limits.
701 Extra args can be added on the same line.
702 See
703 .BR limits
704 for an explanation of the different flags.
705 .TP
706 .B ucdata-path <path>
707 Specify the path to the directory containing the Unicode character
708 tables. The default path is LOCALSTATEDIR/ucdata.
709 .SH TLS OPTIONS
710 If
711 .B slapd
712 is built with support for Transport Layer Security, there are more options
713 you can specify.
714 .TP
715 .B TLSCipherSuite <cipher-suite-spec>
716 Permits configuring what ciphers will be accepted and the preference order.
717 <cipher-suite-spec> should be a cipher specification for OpenSSL.  Example:
718
719 TLSCipherSuite HIGH:MEDIUM:+SSLv2
720
721 To check what ciphers a given spec selects, use:
722
723 openssl ciphers -v <cipher-suite-spec>
724 .TP
725 .B TLSCACertificateFile <filename>
726 Specifies the file that contains certificates for all of the Certificate
727 Authorities that
728 .B slapd
729 will recognize.
730 .TP
731 .B TLSCACertificatePath <path>
732 Specifies the path of a directory that contains Certificate Authority
733 certificates in separate individual files. Usually only one of this
734 or the TLSCACertificateFile is used.
735 .TP
736 .B TLSCertificateFile <filename>
737 Specifies the file that contains the
738 .B slapd
739 server certificate.
740 .TP
741 .B TLSCertificateKeyFile <filename>
742 Specifies the file that contains the
743 .B slapd
744 server private key that matches the certificate stored in the
745 .B TLSCertificateFile
746 file.  Currently, the private key must not be protected with a password, so
747 it is of critical importance that it is protected carefully. 
748 .TP
749 .B TLSRandFile <filename>
750 Specifies the file to obtain random bits from when /dev/[u]random
751 is not available.  Generally set to the name of the EGD/PRNGD socket.
752 The environment variable RANDFILE can also be used to specify the filename.
753 .TP
754 .B TLSVerifyClient <level>
755 Specifies what checks to perform on client certificates in an
756 incoming TLS session, if any.
757 The
758 .B <level>
759 can be specified as one of the following keywords:
760 .RS
761 .TP
762 .B never
763 This is the default.
764 .B slapd
765 will not ask the client for a certificate.
766 .TP
767 .B allow
768 The client certificate is requested.  If no certificate is provided,
769 the session proceeds normally.  If a bad certificate is provided,
770 it will be ignored and the session proceeds normally.
771 .TP
772 .B try
773 The client certificate is requested.  If no certificate is provided,
774 the session proceeds normally.  If a bad certificate is provided,
775 the session is immediately terminated.
776 .TP
777 .B demand | hard | true
778 These keywords are all equivalent, for compatibility reasons.
779 The client certificate is requested.  If no certificate is provided,
780 or a bad certificate is provided, the session is immediately terminated.
781
782 Note that a valid client certificate is required in order to use the
783 SASL EXTERNAL authentication mechanism with a TLS session.  As such,
784 a non-default
785 .B TLSVerifyClient
786 setting must be chosen to enable SASL EXTERNAL authentication.
787 .RE
788 .SH GENERAL BACKEND OPTIONS
789 Options in this section only apply to the configuration file section
790 for the specified backend.  They are supported by every
791 type of backend.
792 .TP
793 .B backend <databasetype>
794 Mark the beginning of a backend definition. <databasetype>
795 should be one of
796 .B bdb,
797 .B dnssrv,
798 .B ldap,
799 .B ldbm,
800 .B meta,
801 .B monitor,
802 .B null,
803 .B passwd,
804 .B perl,
805 .B shell,
806 .B sql,
807 or
808 .B tcl,
809 depending on which backend will serve the database.
810
811 .SH GENERAL DATABASE OPTIONS
812 Options in this section only apply to the configuration file section
813 for the database in which they are defined.  They are supported by every
814 type of backend.  Note that the
815 .B database
816 and at least one
817 .B suffix
818 option are mandatory for each database.
819 .TP
820 .B database <databasetype>
821 Mark the beginning of a new database instance definition. <databasetype>
822 should be one of
823 .B bdb,
824 .B dnssrv,
825 .B ldap,
826 .B ldbm,
827 .B meta,
828 .B monitor,
829 .B null,
830 .B passwd,
831 .B perl,
832 .B shell,
833 .B sql,
834 or
835 .B tcl,
836 depending on which backend will serve the database.
837 .TP
838 .B lastmod on | off
839 Controls whether
840 .B slapd
841 will automatically maintain the 
842 modifiersName, modifyTimestamp, creatorsName, and 
843 createTimestamp attributes for entries.  By default, lastmod is on.
844 .TP
845 .B maxderefdepth <depth>
846 Specifies the maximum number of aliases to dereference when trying to
847 resolve an entry, used to avoid inifinite alias loops. The default is 1.
848 .TP
849 .B readonly on | off
850 This option puts the database into "read-only" mode.  Any attempts to 
851 modify the database will return an "unwilling to perform" error.  By
852 default, readonly is off.
853 .HP
854 .B replica host=<hostname>[:port] [tls=yes|critical]
855 .B [suffix=<suffix> [...]]
856 .B bindmethod=simple|sasl [binddn=<simple DN>] [credentials=<simple password>]
857 .B [saslmech=<SASL mech>] [secopts=<options>] [realm=<realm>]
858 .B [authcId=<authentication ID>] [authcId=<authentication ID>]
859 .B [attr[!]=<attr list>]
860 .RS
861 Specify a replication site for this database.  Refer to the "OpenLDAP 
862 Administrator's Guide" for detailed information on setting up a replicated
863 .B slapd
864 directory service. Zero or more
865 .B suffix
866 instances can be used to select the subtrees that will be replicated
867 (defaults to all the database). A
868 .B bindmethod
869 of
870 .B simple
871 requires the options
872 .B binddn 
873 and
874 .B credentials  
875 and should only be used when adequate security services 
876 (e.g TLS or IPSEC) are in place. A
877 .B bindmethod 
878 of
879 .B sasl 
880 requires the option
881 .B saslmech. 
882 If the 
883 .B mechanism
884 will use Kerberos, a kerberos instance should be given in 
885 .B authcId.
886 An
887 .B attr list
888 can be given after the 
889 .B attr
890 keyword to allow the selective replication of the listed attributes only;
891 if the optional 
892 .B !
893 mark is used, the list is considered exclusive, i.e. the listed attributes
894 are not replicated.
895 If an objectClass is listed, all the related attributes
896 are (are not) replicated.
897 .RE
898 .TP
899 .B replogfile <filename>
900 Specify the name of the replication log file to log changes to.  
901 The replication log is typically written by
902 .BR slapd (8)
903 and read by
904 .BR slurpd (8).
905 See
906 .BR slapd.replog (5)
907 for more information.  The specified file should be located
908 in a directory with limited read/write/execute access as the replication
909 logs may contain sensitive information.
910 .TP
911 .B rootdn <dn>
912 Specify the distinguished name that is not subject to access control 
913 or administrative limit restrictions for operations on this database.
914 This DN may or may not be associated with an entry.  An empty root
915 DN (the default) specifies no root access is to be granted.  It is
916 recommended that the rootdn only be specified when needed (such as
917 when initially populating a database).  If the rootdn is within
918 a namingContext (suffix) of the database, a simple bind password
919 may also be provided using the
920 .B rootpw
921 directive.
922 .TP
923 .B rootpw <password>
924 Specify a password (or hash of the password) for the rootdn.  The
925 password can only be set if the rootdn is within the namingContext
926 (suffix) of the database.
927 This option accepts all RFC 2307 userPassword formats known to
928 the server (see 
929 .B password-hash
930 desription) as well as cleartext.
931 .BR slappasswd (8) 
932 may be used to generate a hash of a password.  Cleartext
933 and \fB{CRYPT}\fP passwords are not recommended.  If empty
934 (the default), authentication of the root DN is by other means
935 (e.g. SASL).  Use of SASL is encouraged.
936 .TP
937 .B suffix <dn suffix>
938 Specify the DN suffix of queries that will be passed to this 
939 backend database.  Multiple suffix lines can be given and at least one is 
940 required for each database definition.
941 If the suffix of one database is "inside" that of another, the database
942 with the inner suffix must come first in the configuration file.
943 .TP
944 .B suffixalias <alias> <aliased suffix>
945 Specify an alternate suffix that may be used to reference an already defined
946 database suffix. Operations specifying DNs residing under the alias 
947 will execute as if they had specified the aliased suffix.
948 .TP
949 .B subordinate
950 Specify that the current backend database is a subordinate of another
951 backend database. A subordinate database may have only one suffix. This
952 option may be used to glue multiple databases into a single namingContext.
953 If the suffix of the current database is within the namingContext of a
954 superior database, searches against the superior database will be
955 propagated to the subordinate as well. All of the databases
956 associated with a single namingContext should have identical rootdns.
957 Behavior of other LDAP operations is unaffected by this setting. In
958 particular, it is not possible to use moddn to move an entry from
959 one subordinate to another subordinate within the namingContext.
960 .TP
961 .B updatedn <dn>
962 This option is only applicable in a slave
963 .B slapd.
964 It specifies the DN allowed to make changes to the replica (typically,
965 this is the DN
966 .BR slurpd (8)
967 binds as when making changes to the replica).
968 .TP
969 .B updateref <url>
970 Specify the referral to pass back when
971 .BR slapd (8)
972 is asked to modify a replicated local database.
973 If specified multiple times, each url is provided.
974 .SH DATABASE-SPECIFIC OPTIONS
975 Each database may allow specific configuration options; they are
976 documented separately in the
977 .BR slapd-<backend> (5)
978 manual pages.
979 .SH EXAMPLES
980 .LP
981 Here is a short example of a configuration file:
982 .LP
983 .RS
984 .nf
985 include   SYSCONFDIR/schema/core.schema
986 pidfile   LOCALSTATEDIR/slapd.pid
987
988 database  bdb
989 suffix    "dc=our-domain,dc=com"
990 # The database directory MUST exist prior to
991 # running slapd AND should only be accessible
992 # by the slapd/tools. Mode 700 recommended.
993 directory LOCALSTATEDIR/openldap-data
994 # Indices to maintain
995 index     objectClass  eq
996 index     cn,sn,mail   pres,eq,approx,sub
997
998 # We serve small clients that do not handle referrals,
999 # so handle remote lookups on their behalf.
1000 database  ldap
1001 suffix    ""
1002 uri       ldap://ldap.some-server.com/
1003 lastmod   off
1004 .fi
1005 .RE
1006 .LP
1007 "OpenLDAP Administrator's Guide" contains a longer annotated
1008 example of a configuration file.
1009 The original ETCDIR/slapd.conf is another example.
1010 .SH FILES
1011 .TP
1012 ETCDIR/slapd.conf
1013 default slapd configuration file
1014 .SH SEE ALSO
1015 .BR ldap (3),
1016 .BR slapd-bdb (5),
1017 .BR slapd-dnssrv (5),
1018 .BR slapd-ldap (5),
1019 .BR slapd-ldbm (5),
1020 .BR slapd-meta (5),
1021 .BR slapd-null (5),
1022 .BR slapd-passwd (5),
1023 .BR slapd-perl (5),
1024 .BR slapd-shell (5),
1025 .BR slapd-sql (5),
1026 .BR slapd-tcl (5),
1027 .BR slapd.replog (5),
1028 .BR slapd.access (5),
1029 .BR locale (5),
1030 .BR slapd (8),
1031 .BR slapadd (8),
1032 .BR slapcat (8),
1033 .BR slapindex (8),
1034 .BR slappassword (8),
1035 .BR slurpd (8),
1036 .LP
1037 "OpenLDAP Administrator's Guide" (http://www.OpenLDAP.org/doc/admin/)
1038 .SH ACKNOWLEDGEMENTS
1039 .B      OpenLDAP
1040 is developed and maintained by The OpenLDAP Project (http://www.openldap.org/).
1041 .B      OpenLDAP
1042 is derived from University of Michigan LDAP 3.3 Release.