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