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