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