]> git.sur5r.net Git - openldap/blob - doc/man/man5/slapd.conf.5
Clean up hash password scheme stuff
[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 .B {SHA}
444 and
445 .B {SSHA}
446 use the SHA-1 algorithm (FIPS 160-1), the latter with a seed.
447
448 .B {MD5}
449 and
450 .B {SMD5}
451 use the MD5 algorithm (RFC 1321), the latter with a seed.
452
453 .B {CRYPT}
454 uses the
455 .BR crypt (3).
456
457 .B {CLEARTEXT}
458 indicates that the new password should be
459 added to userPassword as clear text.
460
461 Note that this option does not alter the normal user applications
462 handling of userPassword during LDAP Add, Modify, or other LDAP operations.
463 .TP
464 .B password\-crypt\-salt\-format <format>
465 Specify the format of the salt passed to
466 .BR crypt (3)
467 when generating {CRYPT} passwords (see
468 .BR password\-hash )
469 during processing of LDAP Password Modify Extended Operations (RFC 3062).
470
471 This string needs to be in
472 .BR sprintf (3)
473 format and may include one (and only one) %s conversion.
474 This conversion will be substituted with a string random
475 characters from [A\-Za\-z0\-9./].  For example, "%.2s"
476 provides a two character salt and "$1$%.8s" tells some
477 versions of crypt(3) to use an MD5 algorithm and provides
478 8 random characters of salt.  The default is "%s", which
479 provides 31 characters of salt.
480 .TP
481 .B pidfile <filename>
482 The ( absolute ) name of a file that will hold the 
483 .B slapd
484 server's process ID ( see
485 .BR getpid (2)
486 ) if started without the debugging command line option.
487 .TP
488 .B referral <url>
489 Specify the referral to pass back when
490 .BR slapd (8)
491 cannot find a local database to handle a request.
492 If specified multiple times, each url is provided.
493 .TP
494 .B require <conditions>
495 Specify a set of conditions (separated by white space) to
496 require (default none).
497 The directive may be specified globally and/or per-database.
498 .B bind
499 requires bind operation prior to directory operations.
500 .B LDAPv3
501 requires session to be using LDAP version 3.
502 .B authc
503 requires authentication prior to directory operations.
504 .B SASL
505 requires SASL authentication prior to directory operations.
506 .B strong
507 requires strong authentication prior to directory operations.
508 The strong keyword allows protected "simple" authentication
509 as well as SASL authentication.
510 .B none
511 may be used to require no conditions (useful for clearly globally
512 set conditions within a particular database).
513 .TP
514 .B reverse-lookup on | off
515 Enable/disable client name reverse lookup (default is 
516 .BR on 
517 if compiled with --enable-rlookups).
518 .TP
519 .B rootDSE <file>
520 Specify the name of an LDIF(5) file containing user defined attributes
521 for the root DSE.  These attributes are returned in addition to the
522 attributes normally produced by slapd.
523 .TP
524 .B sasl-authz-policy <policy>
525 Used to specify which rules to use for SASL Proxy Authorization. Proxy
526 authorization allows a client to authenticate to the server using one
527 user's credentials, but specify a different identity to use for authorization
528 and access control purposes. It essentially allows user A to login as user
529 B, using user A's password.
530 The
531 .B none
532 flag disables proxy authorization. This is the default setting.
533 The
534 .B from
535 flag will use rules in the
536 .I saslAuthzFrom
537 attribute of the authorization DN.
538 The
539 .B to
540 flag will use rules in the
541 .I saslAuthzTo
542 attribute of the authentication DN.
543 The
544 .B both
545 flag will allow both of the above. The rules are simply regular expressions
546 specifying which DNs are allowed to perform proxy authorization. The
547 .I saslAuthzFrom
548 attribute in an entry specifies which other users
549 are allowed to proxy login to this entry. The
550 .I saslAuthzTo
551 attribute in
552 an entry specifies which other users this user can authorize as.  Use of
553 .I saslAuthzTo
554 rules can be easily
555 abused if users are allowed to write arbitrary values to this attribute.
556 In general the
557 .I saslAuthzTo
558 attribute must be protected with ACLs such that
559 only privileged users can modify it.
560 .TP
561 .B sasl-host <fqdn>
562 Used to specify the fully qualified domain name used for SASL processing.
563 .TP
564 .B sasl-realm <realm>
565 Specify SASL realm.  Default is empty.
566 .TP
567 .B sasl-regexp <match> <replace>
568 Used by the SASL authorization mechanism to convert a SASL authenticated 
569 username to an LDAP DN. When an authorization request is received, the SASL 
570 .B USERNAME, REALM, 
571 and
572 .B MECHANISM
573 are taken, when available, and combined into a SASL name of the 
574 form
575 .RS
576 .RS
577 .TP
578 .B uid=<username>[,cn=<realm>],cn=<mechanism>,cn=auth
579
580 .RE
581 This SASL name is then compared against the
582 .B match
583 regular expression, and if the match is successful, the SASL name is
584 replaced with the
585 .B replace
586 string. If there are wildcard strings in the 
587 .B match
588 regular expression that are enclosed in parenthesis, e.g. 
589 .RS
590 .RS
591 .TP
592 .B uid=(.*),cn=.*
593
594 .RE
595 .RE
596 then the portion of the SASL name that matched the wildcard will be stored
597 in the numbered placeholder variable $1. If there are other wildcard strings
598 in parenthesis, the matching strings will be in $2, $3, etc. up to $9. The 
599 placeholders can then be used in the 
600 .B replace
601 string, e.g. 
602 .RS
603 .RS
604 .TP
605 .B cn=$1,ou=Accounts,dc=$2,dc=$4. 
606
607 .RE
608 .RE
609 The replaced SASL name can be either a DN or an LDAP URI. If the latter, the slapd
610 server will use the URI to search its own database, and if the search returns 
611 exactly one entry, the SASL name is replaced by the DN of that entry.
612 Multiple 
613 .B sasl-regexp 
614 options can be given in the configuration file to allow for multiple matching 
615 and replacement patterns. The matching patterns are checked in the order they 
616 appear in the file, stopping at the first successful match.
617
618 .\".B Caution:
619 .\"Because the plus sign + is a character recognized by the regular expression engine,
620 .\"and it will appear in SASL names that include a REALM, be careful to escape the
621 .\"plus sign with a backslash \\+ to remove the character's special meaning.
622 .RE
623 .TP
624 .B sasl-secprops <properties>
625 Used to specify Cyrus SASL security properties.
626 The
627 .B none
628 flag (without any other properities) causes the flag properites
629 default, "noanonymous,noplain", to be cleared.
630 The
631 .B noplain
632 flag disables mechanisms susceptible to simple passive attacks.
633 The
634 .B noactive
635 flag disables mechanisms susceptible to active attacks.
636 The
637 .B nodict
638 flag disables mechanisms susceptible to passive dictionary attacks.
639 The
640 .B noanonyous
641 flag disables mechanisms which support anonymous login.
642 The
643 .B forwardsec
644 flag require forward secrecy between sessions.
645 The
646 .B passcred
647 require mechanisms which pass client credentials (and allow
648 mechanisms which can pass credentials to do so).
649 The
650 .B minssf=<factor> 
651 property specifies the minimum acceptable
652 .I security strength factor
653 as an integer approximate to effective key length used for
654 encryption.  0 (zero) implies no protection, 1 implies integrity
655 protection only, 56 allows DES or other weak ciphers, 112
656 allows triple DES and other strong ciphers, 128 allows RC4,
657 Blowfish and other modern strong ciphers.  The default is 0.
658 The
659 .B maxssf=<factor> 
660 property specifies the maximum acceptable
661 .I security strength factor
662 as an integer (see minssf description).  The default is INT_MAX.
663 The
664 .B maxbufsize=<size> 
665 property specifies the maximum security layer receive buffer
666 size allowed.  0 disables security layers.  The default is 65536.
667 .TP
668 .B schemadn <dn>
669 Specify the distinguished name for the subschema subentry that
670 controls the entries on this server.  The default is "cn=Subschema".
671 .TP
672 .B security <factors>
673 Specify a set of factors (separated by white space) to require.
674 An integer value is associated with each factor and is roughly
675 equivalent of the encryption key length to require.  A value
676 of 112 is equivalent to 3DES, 128 to Blowfish, etc..
677 The directive may be specified globally and/or per-database.
678 .B ssf=<n>
679 specifies the overall security strength factor.
680 .B transport=<n>
681 specifies the transport security strength factor.
682 .B tls=<n>
683 specifies the TLS security strength factor.
684 .B sasl=<n>
685 specifies the SASL security strength factor.
686 .B update_ssf=<n>
687 specifies the overall security strength factor to require for
688 directory updates.
689 .B update_transport=<n>
690 specifies the transport security strength factor to require for
691 directory updates.
692 .B update_tls=<n>
693 specifies the TLS security strength factor to require for
694 directory updates.
695 .B update_sasl=<n>
696 specifies the SASL security strength factor to require for
697 directory updates.
698 Note that the
699 .B transport
700 factor is measure of security provided by the underlying transport,
701 e.g. ldapi:// (and eventually IPSEC).  It is not normally used.
702 .TP
703 .B sizelimit <integer> 
704 .TP
705 .B sizelimit size[.{soft|hard|unchecked}]=<integer> [...]
706 Specify the maximum number of entries to return from a search operation.
707 The default size limit is 500.
708 The second format allows a fine grain setting of the size limits.
709 Extra args can be added on the same line.
710 See
711 .BR limits
712 for an explanation of the different flags.
713 .TP
714 .B sockbuf_max_incoming <integer>
715 Specify the maximum incoming LDAP PDU size for anonymous sessions.
716 The default is 262143.
717 .TP
718 .B sockbuf_max_incoming_auth <integer>
719 Specify the maximum incoming LDAP PDU size for authenticated sessions.
720 The default is 4194303.
721 .TP
722 .B srvtab <filename>
723 Specify the srvtab file in which the kerberos keys necessary for
724 authenticating clients using kerberos can be found. This option is only
725 meaningful if you are using Kerberos authentication.
726 .TP
727 .B threads <integer>
728 Specify the maximum size of the primary thread pool.
729 The default is 32.
730 .TP
731 .B timelimit <integer>
732 .TP
733 .B timelimit time[.{soft|hard}]=<integer> [...]
734 Specify the maximum number of seconds (in real time)
735 .B slapd
736 will spend answering a search request.  The default time limit is 3600.
737 The second format allows a fine grain setting of the time limits.
738 Extra args can be added on the same line.
739 See
740 .BR limits
741 for an explanation of the different flags.
742 .TP
743 .B ucdata-path <path>
744 Specify the path to the directory containing the Unicode character
745 tables. The default path is LOCALSTATEDIR/ucdata.
746 .SH TLS OPTIONS
747 If
748 .B slapd
749 is built with support for Transport Layer Security, there are more options
750 you can specify.
751 .TP
752 .B TLSCipherSuite <cipher-suite-spec>
753 Permits configuring what ciphers will be accepted and the preference order.
754 <cipher-suite-spec> should be a cipher specification for OpenSSL.  Example:
755
756 TLSCipherSuite HIGH:MEDIUM:+SSLv2
757
758 To check what ciphers a given spec selects, use:
759
760 openssl ciphers -v <cipher-suite-spec>
761 .TP
762 .B TLSCACertificateFile <filename>
763 Specifies the file that contains certificates for all of the Certificate
764 Authorities that
765 .B slapd
766 will recognize.
767 .TP
768 .B TLSCACertificatePath <path>
769 Specifies the path of a directory that contains Certificate Authority
770 certificates in separate individual files. Usually only one of this
771 or the TLSCACertificateFile is used.
772 .TP
773 .B TLSCertificateFile <filename>
774 Specifies the file that contains the
775 .B slapd
776 server certificate.
777 .TP
778 .B TLSCertificateKeyFile <filename>
779 Specifies the file that contains the
780 .B slapd
781 server private key that matches the certificate stored in the
782 .B TLSCertificateFile
783 file.  Currently, the private key must not be protected with a password, so
784 it is of critical importance that it is protected carefully. 
785 .TP
786 .B TLSRandFile <filename>
787 Specifies the file to obtain random bits from when /dev/[u]random
788 is not available.  Generally set to the name of the EGD/PRNGD socket.
789 The environment variable RANDFILE can also be used to specify the filename.
790 .TP
791 .B TLSVerifyClient <level>
792 Specifies what checks to perform on client certificates in an
793 incoming TLS session, if any.
794 The
795 .B <level>
796 can be specified as one of the following keywords:
797 .RS
798 .TP
799 .B never
800 This is the default.
801 .B slapd
802 will not ask the client for a certificate.
803 .TP
804 .B allow
805 The client certificate is requested.  If no certificate is provided,
806 the session proceeds normally.  If a bad certificate is provided,
807 it will be ignored and the session proceeds normally.
808 .TP
809 .B try
810 The client certificate is requested.  If no certificate is provided,
811 the session proceeds normally.  If a bad certificate is provided,
812 the session is immediately terminated.
813 .TP
814 .B demand | hard | true
815 These keywords are all equivalent, for compatibility reasons.
816 The client certificate is requested.  If no certificate is provided,
817 or a bad certificate is provided, the session is immediately terminated.
818
819 Note that a valid client certificate is required in order to use the
820 SASL EXTERNAL authentication mechanism with a TLS session.  As such,
821 a non-default
822 .B TLSVerifyClient
823 setting must be chosen to enable SASL EXTERNAL authentication.
824 .RE
825 .SH GENERAL BACKEND OPTIONS
826 Options in this section only apply to the configuration file section
827 for the specified backend.  They are supported by every
828 type of backend.
829 .TP
830 .B backend <databasetype>
831 Mark the beginning of a backend definition. <databasetype>
832 should be one of
833 .B bdb,
834 .B dnssrv,
835 .B ldap,
836 .B ldbm,
837 .B meta,
838 .B monitor,
839 .B null,
840 .B passwd,
841 .B perl,
842 .B shell,
843 .B sql,
844 or
845 .B tcl,
846 depending on which backend will serve the database.
847
848 .SH GENERAL DATABASE OPTIONS
849 Options in this section only apply to the configuration file section
850 for the database in which they are defined.  They are supported by every
851 type of backend.  Note that the
852 .B database
853 and at least one
854 .B suffix
855 option are mandatory for each database.
856 .TP
857 .B database <databasetype>
858 Mark the beginning of a new database instance definition. <databasetype>
859 should be one of
860 .B bdb,
861 .B dnssrv,
862 .B ldap,
863 .B ldbm,
864 .B meta,
865 .B monitor,
866 .B null,
867 .B passwd,
868 .B perl,
869 .B shell,
870 .B sql,
871 or
872 .B tcl,
873 depending on which backend will serve the database.
874 .TP
875 .B lastmod on | off
876 Controls whether
877 .B slapd
878 will automatically maintain the 
879 modifiersName, modifyTimestamp, creatorsName, and 
880 createTimestamp attributes for entries.  By default, lastmod is on.
881 .TP
882 .B maxderefdepth <depth>
883 Specifies the maximum number of aliases to dereference when trying to
884 resolve an entry, used to avoid inifinite alias loops. The default is 1.
885 .TP
886 .B readonly on | off
887 This option puts the database into "read-only" mode.  Any attempts to 
888 modify the database will return an "unwilling to perform" error.  By
889 default, readonly is off.
890 .HP
891 .B replica host=<hostname>[:port] [tls=yes|critical]
892 .B [suffix=<suffix> [...]]
893 .B bindmethod=simple|sasl [binddn=<simple DN>] [credentials=<simple password>]
894 .B [saslmech=<SASL mech>] [secprops=<properties>] [realm=<realm>]
895 .B [authcId=<authentication ID>] [authzId=<authorization ID>]
896 .B [attr[!]=<attr list>]
897 .RS
898 Specify a replication site for this database.  Refer to the "OpenLDAP 
899 Administrator's Guide" for detailed information on setting up a replicated
900 .B slapd
901 directory service. Zero or more
902 .B suffix
903 instances can be used to select the subtrees that will be replicated
904 (defaults to all the database). A
905 .B bindmethod
906 of
907 .B simple
908 requires the options
909 .B binddn 
910 and
911 .B credentials  
912 and should only be used when adequate security services 
913 (e.g TLS or IPSEC) are in place. A
914 .B bindmethod 
915 of
916 .B sasl 
917 requires the option
918 .B saslmech. 
919 Specific security properties (as with the
920 .B sasl-secprops
921 keyword above) for a SASL bind can be set with the
922 .B secprops
923 option. A non-default SASL realm can be set with the
924 .B realm
925 option.
926 If the 
927 .B mechanism
928 will use Kerberos, a kerberos instance should be given in 
929 .B authcId.
930 An
931 .B attr list
932 can be given after the 
933 .B attr
934 keyword to allow the selective replication of the listed attributes only;
935 if the optional 
936 .B !
937 mark is used, the list is considered exclusive, i.e. the listed attributes
938 are not replicated.
939 If an objectClass is listed, all the related attributes
940 are (are not) replicated.
941 .RE
942 .TP
943 .B replogfile <filename>
944 Specify the name of the replication log file to log changes to.  
945 The replication log is typically written by
946 .BR slapd (8)
947 and read by
948 .BR slurpd (8).
949 See
950 .BR slapd.replog (5)
951 for more information.  The specified file should be located
952 in a directory with limited read/write/execute access as the replication
953 logs may contain sensitive information.
954 .TP
955 .B rootdn <dn>
956 Specify the distinguished name that is not subject to access control 
957 or administrative limit restrictions for operations on this database.
958 This DN may or may not be associated with an entry.  An empty root
959 DN (the default) specifies no root access is to be granted.  It is
960 recommended that the rootdn only be specified when needed (such as
961 when initially populating a database).  If the rootdn is within
962 a namingContext (suffix) of the database, a simple bind password
963 may also be provided using the
964 .B rootpw
965 directive.
966 .TP
967 .B rootpw <password>
968 Specify a password (or hash of the password) for the rootdn.  The
969 password can only be set if the rootdn is within the namingContext
970 (suffix) of the database.
971 This option accepts all RFC 2307 userPassword formats known to
972 the server (see 
973 .B password-hash
974 desription) as well as cleartext.
975 .BR slappasswd (8) 
976 may be used to generate a hash of a password.  Cleartext
977 and \fB{CRYPT}\fP passwords are not recommended.  If empty
978 (the default), authentication of the root DN is by other means
979 (e.g. SASL).  Use of SASL is encouraged.
980 .TP
981 .B suffix <dn suffix>
982 Specify the DN suffix of queries that will be passed to this 
983 backend database.  Multiple suffix lines can be given and at least one is 
984 required for each database definition.
985 If the suffix of one database is "inside" that of another, the database
986 with the inner suffix must come first in the configuration file.
987 .TP
988 .B suffixalias <alias> <aliased suffix>
989 Specify an alternate suffix that may be used to reference an already defined
990 database suffix. Operations specifying DNs residing under the alias 
991 will execute as if they had specified the aliased suffix.
992 .TP
993 .B subordinate
994 Specify that the current backend database is a subordinate of another
995 backend database. A subordinate database may have only one suffix. This
996 option may be used to glue multiple databases into a single namingContext.
997 If the suffix of the current database is within the namingContext of a
998 superior database, searches against the superior database will be
999 propagated to the subordinate as well. All of the databases
1000 associated with a single namingContext should have identical rootdns.
1001 Behavior of other LDAP operations is unaffected by this setting. In
1002 particular, it is not possible to use moddn to move an entry from
1003 one subordinate to another subordinate within the namingContext.
1004 .TP
1005 .B updatedn <dn>
1006 This option is only applicable in a slave
1007 .B slapd.
1008 It specifies the DN allowed to make changes to the replica (typically,
1009 this is the DN
1010 .BR slurpd (8)
1011 binds as when making changes to the replica).
1012 .TP
1013 .B updateref <url>
1014 Specify the referral to pass back when
1015 .BR slapd (8)
1016 is asked to modify a replicated local database.
1017 If specified multiple times, each url is provided.
1018 .SH DATABASE-SPECIFIC OPTIONS
1019 Each database may allow specific configuration options; they are
1020 documented separately in the
1021 .BR slapd-<backend> (5)
1022 manual pages.
1023 .SH EXAMPLES
1024 .LP
1025 Here is a short example of a configuration file:
1026 .LP
1027 .RS
1028 .nf
1029 include   SYSCONFDIR/schema/core.schema
1030 pidfile   LOCALSTATEDIR/slapd.pid
1031
1032 database  bdb
1033 suffix    "dc=our-domain,dc=com"
1034 # The database directory MUST exist prior to
1035 # running slapd AND should only be accessible
1036 # by the slapd/tools. Mode 700 recommended.
1037 directory LOCALSTATEDIR/openldap-data
1038 # Indices to maintain
1039 index     objectClass  eq
1040 index     cn,sn,mail   pres,eq,approx,sub
1041
1042 # We serve small clients that do not handle referrals,
1043 # so handle remote lookups on their behalf.
1044 database  ldap
1045 suffix    ""
1046 uri       ldap://ldap.some-server.com/
1047 lastmod   off
1048 .fi
1049 .RE
1050 .LP
1051 "OpenLDAP Administrator's Guide" contains a longer annotated
1052 example of a configuration file.
1053 The original ETCDIR/slapd.conf is another example.
1054 .SH FILES
1055 .TP
1056 ETCDIR/slapd.conf
1057 default slapd configuration file
1058 .SH SEE ALSO
1059 .BR ldap (3),
1060 .BR slapd-bdb (5),
1061 .BR slapd-dnssrv (5),
1062 .BR slapd-ldap (5),
1063 .BR slapd-ldbm (5),
1064 .BR slapd-meta (5),
1065 .BR slapd-null (5),
1066 .BR slapd-passwd (5),
1067 .BR slapd-perl (5),
1068 .BR slapd-shell (5),
1069 .BR slapd-sql (5),
1070 .BR slapd-tcl (5),
1071 .BR slapd.replog (5),
1072 .BR slapd.access (5),
1073 .BR locale (5),
1074 .BR slapd (8),
1075 .BR slapadd (8),
1076 .BR slapcat (8),
1077 .BR slapindex (8),
1078 .BR slappassword (8),
1079 .BR slurpd (8),
1080 .LP
1081 "OpenLDAP Administrator's Guide" (http://www.OpenLDAP.org/doc/admin/)
1082 .SH ACKNOWLEDGEMENTS
1083 .B      OpenLDAP
1084 is developed and maintained by The OpenLDAP Project (http://www.openldap.org/).
1085 .B      OpenLDAP
1086 is derived from University of Michigan LDAP 3.3 Release.