]> git.sur5r.net Git - openldap/blob - doc/man/man5/slapd.conf.5
ITS#5975: Fix pidfile/argsfile doc - they are independent of debug mode.
[openldap] / doc / man / man5 / slapd.conf.5
1 .TH SLAPD.CONF 5 "RELEASEDATE" "OpenLDAP LDVERSION"
2 .\" Copyright 1998-2009 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 SLAPD tools
15 .BR slapacl (8),
16 .BR slapadd (8),
17 .BR slapauth (8),
18 .BR slapcat (8),
19 .BR slapdn (8),
20 .BR slapindex (8),
21 and
22 .BR slaptest (8).
23 .LP
24 The
25 .B slapd.conf
26 file consists of a series of global configuration options that apply to
27 .B slapd
28 as a whole (including all backends), followed by zero or more database
29 backend definitions that contain information specific to a backend
30 instance.
31 The configuration options are case-insensitive;
32 their value, on a case by case basis, may be case-sensitive.
33 .LP
34 The general format of
35 .B slapd.conf
36 is as follows:
37 .LP
38 .nf
39     # comment - these options apply to every database
40     <global configuration options>
41     # first database definition & configuration options
42     database <backend 1 type>
43     <configuration options specific to backend 1>
44     # subsequent database definitions & configuration options
45     ...
46 .fi
47 .LP
48 As many backend-specific sections as desired may be included.  Global
49 options can be overridden in a backend (for options that appear more
50 than once, the last appearance in the
51 .B slapd.conf
52 file is used).
53 .LP
54 If a line begins with white space, it is considered a continuation
55 of the previous line.  No physical line should be over 2000 bytes
56 long.
57 .LP
58 Blank lines and comment lines beginning with
59 a `#' character are ignored.  Note: continuation lines are unwrapped
60 before comment processing is applied.
61 .LP
62 Arguments on configuration lines are separated by white space. If an
63 argument contains white space, the argument should be enclosed in
64 double quotes.  If an argument contains a double quote (`"') or a
65 backslash character (`\\'), the character should be preceded by a
66 backslash character.
67 .LP
68 The specific configuration options available are discussed below in the
69 Global Configuration Options, General Backend Options, and General Database
70 Options.  Backend-specific options are discussed in the
71 .B slapd-<backend>(5)
72 manual pages.  Refer to the "OpenLDAP Administrator's Guide" for more
73 details on the slapd configuration file.
74 .SH GLOBAL CONFIGURATION OPTIONS
75 Options described in this section apply to all backends, unless specifically 
76 overridden in a backend definition. Arguments that should be replaced by 
77 actual text are shown in brackets <>.
78 .TP
79 .B access to <what> "[ by <who> <access> <control> ]+"
80 Grant access (specified by <access>) to a set of entries and/or
81 attributes (specified by <what>) by one or more requestors (specified
82 by <who>).
83 If no access controls are present, the default policy
84 allows anyone and everyone to read anything but restricts
85 updates to rootdn.  (e.g., "access to * by * read").
86 The rootdn can always read and write EVERYTHING!
87 See
88 .BR slapd.access (5)
89 and the "OpenLDAP's Administrator's Guide" for details.
90 .TP
91 .B allow <features>
92 Specify a set of features (separated by white space) to
93 allow (default none).
94 .B bind_v2
95 allows acceptance of LDAPv2 bind requests.  Note that
96 .BR slapd (8)
97 does not truly implement LDAPv2 (RFC 1777), now Historic (RFC 3494).
98 .B bind_anon_cred
99 allows anonymous bind when credentials are not empty (e.g.
100 when DN is empty).
101 .B bind_anon_dn
102 allows unauthenticated (anonymous) bind when DN is not empty.
103 .B update_anon
104 allows unauthenticated (anonymous) update operations to be processed
105 (subject to access controls and other administrative limits).
106 .B proxy_authz_anon
107 allows unauthenticated (anonymous) proxy authorization control to be processed
108 (subject to access controls, authorization and other administrative limits).
109 .TP
110 .B argsfile <filename>
111 The (absolute) name of a file that will hold the 
112 .B slapd
113 server's command line (program name and options).
114 .TP
115 .B attributeoptions [option-name]...
116 Define tagging attribute options or option tag/range prefixes.
117 Options must not end with `-', prefixes must end with `-'.
118 The `lang-' prefix is predefined.
119 If you use the
120 .B attributeoptions
121 directive, `lang-' will no longer be defined and you must specify it
122 explicitly if you want it defined.
123
124 An attribute description with a tagging option is a subtype of that
125 attribute description without the option.
126 Except for that, options defined this way have no special semantics.
127 Prefixes defined this way work like the `lang-' options:
128 They define a prefix for tagging options starting with the prefix.
129 That is, if you define the prefix `x-foo-', you can use the option
130 `x-foo-bar'.
131 Furthermore, in a search or compare, a prefix or range name (with
132 a trailing `-') matches all options starting with that name, as well
133 as the option with the range name sans the trailing `-'.
134 That is, `x-foo-bar-' matches `x-foo-bar' and `x-foo-bar-baz'.
135
136 RFC 4520 reserves options beginning with `x-' for private experiments.
137 Other options should be registered with IANA, see RFC 4520 section 3.5.
138 OpenLDAP also has the `binary' option built in, but this is a transfer
139 option, not a tagging option.
140 .HP
141 .hy 0
142 .B attributetype "(\ <oid>\
143  [NAME\ <name>]\
144  [DESC\ <description>]\
145  [OBSOLETE]\
146  [SUP\ <oid>]\
147  [EQUALITY\ <oid>]\
148  [ORDERING\ <oid>]\
149  [SUBSTR\ <oid>]\
150  [SYNTAX\ <oidlen>]\
151  [SINGLE\-VALUE]\
152  [COLLECTIVE]\
153  [NO\-USER\-MODIFICATION]\
154  [USAGE\ <attributeUsage>]\ )"
155 .RS
156 Specify an attribute type using the LDAPv3 syntax defined in RFC 4512.
157 The slapd parser extends the RFC 4512 definition by allowing string
158 forms as well as numeric OIDs to be used for the attribute OID and
159 attribute syntax OID.
160 (See the
161 .B objectidentifier
162 description.) 
163 .RE
164 .TP
165 .B authz-policy <policy>
166 Used to specify which rules to use for Proxy Authorization.  Proxy
167 authorization allows a client to authenticate to the server using one
168 user's credentials, but specify a different identity to use for authorization
169 and access control purposes. It essentially allows user A to login as user
170 B, using user A's password.
171 The
172 .B none
173 flag disables proxy authorization. This is the default setting.
174 The
175 .B from
176 flag will use rules in the
177 .I authzFrom
178 attribute of the authorization DN.
179 The
180 .B to
181 flag will use rules in the
182 .I authzTo
183 attribute of the authentication DN.
184 The
185 .B any
186 flag, an alias for the deprecated value of
187 .BR both ,
188 will allow any of the above, whatever succeeds first (checked in
189 .BR to ,
190 .B from
191 sequence.
192 The
193 .B all
194 flag requires both authorizations to succeed.
195 .LP
196 .RS
197 The rules are mechanisms to specify which identities are allowed 
198 to perform proxy authorization.
199 The
200 .I authzFrom
201 attribute in an entry specifies which other users
202 are allowed to proxy login to this entry. The
203 .I authzTo
204 attribute in
205 an entry specifies which other users this user can authorize as.  Use of
206 .I authzTo
207 rules can be easily
208 abused if users are allowed to write arbitrary values to this attribute.
209 In general the
210 .I authzTo
211 attribute must be protected with ACLs such that
212 only privileged users can modify it.
213 The value of
214 .I authzFrom
215 and
216 .I authzTo
217 describes an 
218 .B identity 
219 or a set of identities; it can take five forms:
220 .RS
221 .TP
222 .B ldap:///<base>??[<scope>]?<filter>
223 .RE
224 .RS
225 .B dn[.<dnstyle>]:<pattern>
226 .RE
227 .RS
228 .B u[.<mech>[/<realm>]]:<pattern>
229 .RE
230 .RS
231 .B group[/objectClass[/attributeType]]:<pattern>
232 .RE
233 .RS
234 .B <pattern>
235 .RE
236 .RS
237
238 .B <dnstyle>:={exact|onelevel|children|subtree|regex}
239
240 .RE
241 The first form is a valid LDAP
242 .B URI
243 where the 
244 .IR <host>:<port> ,
245 the
246 .I <attrs>
247 and the
248 .I <extensions>
249 portions must be absent, so that the search occurs locally on either
250 .I authzFrom
251 or 
252 .IR authzTo .
253 The second form is a 
254 .BR DN ,
255 with the optional style modifiers
256 .IR exact ,
257 .IR onelevel ,
258 .IR children ,
259 and
260 .I subtree
261 for exact, onelevel, children and subtree matches, which cause 
262 .I <pattern>
263 to be normalized according to the DN normalization rules, or the special
264 .I regex
265 style, which causes the
266 .I <pattern>
267 to be treated as a POSIX (''extended'') regular expression, as
268 discussed in
269 .BR regex (7)
270 and/or
271 .BR re_format (7).
272 A pattern of
273 .I *
274 means any non-anonymous DN.
275 The third form is a SASL
276 .BR id ,
277 with the optional fields
278 .I <mech>
279 and
280 .I <realm>
281 that allow to specify a SASL
282 .BR mechanism ,
283 and eventually a SASL
284 .BR realm ,
285 for those mechanisms that support one.
286 The need to allow the specification of a mechanism is still debated, 
287 and users are strongly discouraged to rely on this possibility.
288 The fourth form is a group specification, consisting of the keyword
289 .BR group ,
290 optionally followed by the specification of the group
291 .B objectClass
292 and member
293 .BR attributeType .
294 The group with DN
295 .B <pattern>
296 is searched with base scope, and in case of match, the values of the
297 member
298 .B attributeType
299 are searched for the asserted DN.
300 For backwards compatibility, if no identity type is provided, i.e. only
301 .B <pattern>
302 is present, an
303 .I exact DN
304 is assumed; as a consequence, 
305 .B <pattern>
306 is subjected to DN normalization.
307 Since the interpretation of
308 .I authzFrom
309 and
310 .I authzTo
311 can impact security, users are strongly encouraged 
312 to explicitly set the type of identity specification that is being used.
313 A subset of these rules can be used as third arg in the 
314 .B authz-regexp
315 statement (see below); significantly, the 
316 .IR URI ,
317 provided it results in exactly one entry,
318 and the
319 .I dn.exact:<dn> 
320 forms.
321 .RE
322 .TP
323 .B authz-regexp <match> <replace>
324 Used by the authentication framework to convert simple user names,
325 such as provided by SASL subsystem, or extracted from certificates
326 in case of cert-based SASL EXTERNAL, or provided within the RFC 4370
327 "proxied authorization" control, to an LDAP DN used for
328 authorization purposes.  Note that the resulting DN need not refer
329 to an existing entry to be considered valid.  When an authorization
330 request is received from the SASL subsystem, the SASL 
331 .BR USERNAME ,
332 .BR REALM , 
333 and
334 .B MECHANISM
335 are taken, when available, and combined into a name of the form
336 .RS
337 .RS
338 .TP
339 .B UID=<username>[[,CN=<realm>],CN=<mechanism>],CN=auth
340
341 .RE
342 This name is then compared against the
343 .B match
344 POSIX (''extended'') regular expression, and if the match is successful,
345 the name is replaced with the
346 .B replace
347 string.  If there are wildcard strings in the 
348 .B match
349 regular expression that are enclosed in parenthesis, e.g. 
350 .RS
351 .TP
352 .B UID=([^,]*),CN=.*
353
354 .RE
355 then the portion of the name that matched the wildcard will be stored
356 in the numbered placeholder variable $1. If there are other wildcard strings
357 in parenthesis, the matching strings will be in $2, $3, etc. up to $9. The 
358 placeholders can then be used in the 
359 .B replace
360 string, e.g. 
361 .RS
362 .TP
363 .B UID=$1,OU=Accounts,DC=example,DC=com 
364
365 .RE
366 The replaced name can be either a DN, i.e. a string prefixed by "dn:",
367 or an LDAP URI.
368 If the latter, the server will use the URI to search its own database(s)
369 and, if the search returns exactly one entry, the name is
370 replaced by the DN of that entry.   The LDAP URI must have no
371 hostport, attrs, or extensions components, but the filter is mandatory,
372 e.g.
373 .RS
374 .TP
375 .B ldap:///OU=Accounts,DC=example,DC=com??one?(UID=$1)
376
377 .RE
378 The protocol portion of the URI must be strictly
379 .BR ldap .
380 Note that this search is subject to access controls.  Specifically,
381 the authentication identity must have "auth" access in the subject.
382
383 Multiple 
384 .B authz-regexp 
385 options can be given in the configuration file to allow for multiple matching 
386 and replacement patterns. The matching patterns are checked in the order they 
387 appear in the file, stopping at the first successful match.
388
389 .\".B Caution:
390 .\"Because the plus sign + is a character recognized by the regular expression engine,
391 .\"and it will appear in names that include a REALM, be careful to escape the
392 .\"plus sign with a backslash \\+ to remove the character's special meaning.
393 .RE
394 .TP
395 .B concurrency <integer>
396 Specify a desired level of concurrency.  Provided to the underlying
397 thread system as a hint.  The default is not to provide any hint.
398 .TP
399 .B conn_max_pending <integer>
400 Specify the maximum number of pending requests for an anonymous session.
401 If requests are submitted faster than the server can process them, they
402 will be queued up to this limit. If the limit is exceeded, the session
403 is closed. The default is 100.
404 .TP
405 .B conn_max_pending_auth <integer>
406 Specify the maximum number of pending requests for an authenticated session.
407 The default is 1000.
408 .TP
409 .B defaultsearchbase <dn>
410 Specify a default search base to use when client submits a
411 non-base search request with an empty base DN.
412 Base scoped search requests with an empty base DN are not affected.
413 .TP
414 .B disallow <features>
415 Specify a set of features (separated by white space) to
416 disallow (default none).
417 .B bind_anon
418 disables acceptance of anonymous bind requests.  Note that this setting
419 does not prohibit anonymous directory access (See "require authc").
420 .B bind_simple
421 disables simple (bind) authentication.
422 .B tls_2_anon
423 disables forcing session to anonymous status (see also
424 .BR tls_authc )
425 upon StartTLS operation receipt.
426 .B tls_authc
427 disallows the StartTLS operation if authenticated (see also
428 .BR tls_2_anon ).
429 .B proxy_authz_non_critical
430 disables acceptance of the proxied authorization control (RFC4370)
431 when criticality is FALSE.
432 .B dontusecopy_non_critical
433 disables acceptance of the dontUseCopy control (a work in progress)
434 when criticality is FALSE.
435 .HP
436 .hy 0
437 .B ditcontentrule "(\ <oid>\
438  [NAME\ <name>]\
439  [DESC\ <description>]\
440  [OBSOLETE]\
441  [AUX\ <oids>]\
442  [MUST\ <oids>]\
443  [MAY\ <oids>]\
444  [NOT\ <oids>]\ )"
445 .RS
446 Specify an DIT Content Rule using the LDAPv3 syntax defined in RFC 4512.
447 The slapd parser extends the RFC 4512 definition by allowing string
448 forms as well as numeric OIDs to be used for the attribute OID and
449 attribute syntax OID.
450 (See the
451 .B objectidentifier
452 description.) 
453 .RE
454 .TP
455 .B gentlehup { on | off }
456 A SIGHUP signal will only cause a 'gentle' shutdown-attempt:
457 .B Slapd
458 will stop listening for new connections, but will not close the
459 connections to the current clients.  Future write operations return
460 unwilling-to-perform, though.  Slapd terminates when all clients
461 have closed their connections (if they ever do), or \- as before \-
462 if it receives a SIGTERM signal.  This can be useful if you wish to
463 terminate the server and start a new
464 .B slapd
465 server
466 .B with another database,
467 without disrupting the currently active clients.
468 The default is off.  You may wish to use
469 .B idletimeout
470 along with this option.
471 .TP
472 .B idletimeout <integer>
473 Specify the number of seconds to wait before forcibly closing
474 an idle client connection.  A idletimeout of 0 disables this
475 feature.  The default is 0. You may also want to set the
476 .B writetimeout
477 option.
478 .TP
479 .B include <filename>
480 Read additional configuration information from the given file before
481 continuing with the next line of the current file.
482 .TP
483 .B index_intlen <integer>
484 Specify the key length for ordered integer indices. The most significant
485 bytes of the binary integer will be used for index keys. The default
486 value is 4, which provides exact indexing for 31 bit values.
487 A floating point representation is used to index too large values.
488 .TP
489 .B index_substr_if_minlen <integer>
490 Specify the minimum length for subinitial and subfinal indices. An
491 attribute value must have at least this many characters in order to be
492 processed by the indexing functions. The default is 2.
493 .TP
494 .B index_substr_if_maxlen <integer>
495 Specify the maximum length for subinitial and subfinal indices. Only
496 this many characters of an attribute value will be processed by the
497 indexing functions; any excess characters are ignored. The default is 4.
498 .TP
499 .B index_substr_any_len <integer>
500 Specify the length used for subany indices. An attribute value must have
501 at least this many characters in order to be processed. Attribute values
502 longer than this length will be processed in segments of this length. The
503 default is 4. The subany index will also be used in subinitial and
504 subfinal index lookups when the filter string is longer than the
505 .I index_substr_if_maxlen
506 value.
507 .TP
508 .B index_substr_any_step <integer>
509 Specify the steps used in subany index lookups. This value sets the offset
510 for the segments of a filter string that are processed for a subany index
511 lookup. The default is 2. For example, with the default values, a search
512 using this filter "cn=*abcdefgh*" would generate index lookups for
513 "abcd", "cdef", and "efgh".
514
515 .LP
516 Note: Indexing support depends on the particular backend in use. Also,
517 changing these settings will generally require deleting any indices that
518 depend on these parameters and recreating them with
519 .BR slapindex (8).
520
521 .HP
522 .hy 0
523 .B ldapsyntax "(\ <oid>\
524  [DESC\ <description>]\
525  [X-SUBST <substitute\-syntax>]\ )"
526 .RS
527 Specify an LDAP syntax using the LDAPv3 syntax defined in RFC 4512.
528 The slapd parser extends the RFC 4512 definition by allowing string
529 forms as well as numeric OIDs to be used for the syntax OID.
530 (See the
531 .B objectidentifier
532 description.) 
533 The slapd parser also honors the
534 .B X-SUBST
535 extension (an OpenLDAP-specific extension), which allows to use the
536 .B ldapsyntax
537 statement to define a non-implemented syntax along with another syntax,
538 the extension value
539 .IR substitute\-syntax ,
540 as its temporary replacement.
541 The
542 .I substitute\-syntax
543 must be defined.
544 This allows to define attribute types that make use of non-implemented syntaxes
545 using the correct syntax OID.
546 Unless 
547 .B X-SUBST
548 is used, this configuration statement would result in an error,
549 since no handlers would be associated to the resulting syntax structure.
550 .RE
551
552 .TP
553 .B localSSF <SSF>
554 Specifies the Security Strength Factor (SSF) to be given local LDAP sessions,
555 such as those to the ldapi:// listener.  For a description of SSF values,
556 see 
557 .BR sasl-secprops 's
558 .B minssf
559 option description.  The default is 71.
560 .TP
561 .B logfile <filename>
562 Specify a file for recording debug log messages. By default these messages
563 only go to stderr and are not recorded anywhere else. Specifying a logfile
564 copies messages to both stderr and the logfile.
565 .TP
566 .B loglevel <integer> [...]
567 Specify the level at which debugging statements and operation 
568 statistics should be syslogged (currently logged to the
569 .BR syslogd (8) 
570 LOG_LOCAL4 facility).
571 They must be considered subsystems rather than increasingly verbose 
572 log levels.
573 Some messages with higher priority are logged regardless 
574 of the configured loglevel as soon as any logging is configured.
575 Log levels are additive, and available levels are:
576 .RS
577 .RS
578 .PD 0
579 .TP
580 .B 1
581 .B (0x1 trace)
582 trace function calls
583 .TP
584 .B 2
585 .B (0x2 packets)
586 debug packet handling
587 .TP
588 .B 4
589 .B (0x4 args)
590 heavy trace debugging (function args)
591 .TP
592 .B 8
593 .B (0x8 conns)
594 connection management
595 .TP
596 .B 16
597 .B (0x10 BER)
598 print out packets sent and received
599 .TP
600 .B 32
601 .B (0x20 filter)
602 search filter processing
603 .TP
604 .B 64
605 .B (0x40 config)
606 configuration file processing
607 .TP
608 .B 128
609 .B (0x80 ACL)
610 access control list processing
611 .TP
612 .B 256
613 .B (0x100 stats)
614 connections, LDAP operations, results (recommended)
615 .TP
616 .B 512
617 .B (0x200 stats2)
618 stats log entries sent
619 .TP
620 .B 1024
621 .B (0x400 shell)
622 print communication with shell backends
623 .TP
624 .B 2048
625 .B (0x800 parse)
626 entry parsing
627 \".TP
628 \".B 4096
629 \".B (0x1000 cache)
630 \"caching (unused)
631 \".TP
632 \".B 8192
633 \".B (0x2000 index)
634 \"data indexing (unused)
635 .TP
636 .B 16384
637 .B (0x4000 sync)
638 LDAPSync replication
639 .TP
640 .B 32768
641 .B (0x8000 none)
642 only messages that get logged whatever log level is set
643 .PD
644 .RE
645 The desired log level can be input as a single integer that combines 
646 the (ORed) desired levels, both in decimal or in hexadecimal notation,
647 as a list of integers (that are ORed internally),
648 or as a list of the names that are shown between brackets, such that
649 .LP
650 .nf
651     loglevel 129
652     loglevel 0x81
653     loglevel 128 1
654     loglevel 0x80 0x1
655     loglevel acl trace
656 .fi
657 .LP
658 are equivalent.
659 The keyword 
660 .B any
661 can be used as a shortcut to enable logging at all levels (equivalent to -1).
662 The keyword
663 .BR none ,
664 or the equivalent integer representation, causes those messages
665 that are logged regardless of the configured loglevel to be logged.
666 In fact, if loglevel is set to 0, no logging occurs, 
667 so at least the 
668 .B none
669 level is required to have high priority messages logged.
670
671 The loglevel defaults to \fBstats\fP.
672 This level should usually also be included when using other loglevels, to
673 help analyze the logs.
674 .RE
675 .TP
676 .B moduleload <filename>
677 Specify the name of a dynamically loadable module to load. The filename
678 may be an absolute path name or a simple filename. Non-absolute names
679 are searched for in the directories specified by the
680 .B modulepath
681 option. This option and the
682 .B modulepath
683 option are only usable if slapd was compiled with --enable-modules.
684 .TP
685 .B modulepath <pathspec>
686 Specify a list of directories to search for loadable modules. Typically
687 the path is colon-separated but this depends on the operating system.
688 .HP
689 .hy 0
690 .B objectclass "(\ <oid>\
691  [NAME\ <name>]\
692  [DESC\ <description>]\
693  [OBSOLETE]\
694  [SUP\ <oids>]\
695  [{ ABSTRACT | STRUCTURAL | AUXILIARY }]\
696  [MUST\ <oids>] [MAY\ <oids>] )"
697 .RS
698 Specify an objectclass using the LDAPv3 syntax defined in RFC 4512.
699 The slapd parser extends the RFC 4512 definition by allowing string
700 forms as well as numeric OIDs to be used for the object class OID.
701 (See the
702 .B
703 objectidentifier
704 description.)  Object classes are "STRUCTURAL" by default.
705 .RE
706 .TP
707 .B objectidentifier <name> "{ <oid> | <name>[:<suffix>] }"
708 Define a string name that equates to the given OID. The string can be used
709 in place of the numeric OID in objectclass and attribute definitions. The
710 name can also be used with a suffix of the form ":xx" in which case the
711 value "oid.xx" will be used.
712 .TP
713 .B password-hash <hash> [<hash>...]
714 This option configures one or more hashes to be used in generation of user
715 passwords stored in the userPassword attribute during processing of
716 LDAP Password Modify Extended Operations (RFC 3062).
717 The <hash> must be one of
718 .BR {SSHA} ,
719 .BR {SHA} ,
720 .BR {SMD5} ,
721 .BR {MD5} ,
722 .BR {CRYPT} ,
723 and
724 .BR {CLEARTEXT} .
725 The default is
726 .BR {SSHA} .
727
728 .B {SHA}
729 and
730 .B {SSHA}
731 use the SHA-1 algorithm (FIPS 160-1), the latter with a seed.
732
733 .B {MD5}
734 and
735 .B {SMD5}
736 use the MD5 algorithm (RFC 1321), the latter with a seed.
737
738 .B {CRYPT}
739 uses the
740 .BR crypt (3).
741
742 .B {CLEARTEXT}
743 indicates that the new password should be
744 added to userPassword as clear text.
745
746 Note that this option does not alter the normal user applications
747 handling of userPassword during LDAP Add, Modify, or other LDAP operations.
748 .TP
749 .B password\-crypt\-salt\-format <format>
750 Specify the format of the salt passed to
751 .BR crypt (3)
752 when generating {CRYPT} passwords (see
753 .BR password\-hash )
754 during processing of LDAP Password Modify Extended Operations (RFC 3062).
755
756 This string needs to be in
757 .BR sprintf (3)
758 format and may include one (and only one) %s conversion.
759 This conversion will be substituted with a string of random
760 characters from [A\-Za\-z0\-9./].  For example, "%.2s"
761 provides a two character salt and "$1$%.8s" tells some
762 versions of crypt(3) to use an MD5 algorithm and provides
763 8 random characters of salt.  The default is "%s", which
764 provides 31 characters of salt.
765 .TP
766 .B pidfile <filename>
767 The (absolute) name of a file that will hold the 
768 .B slapd
769 server's process ID (see
770 .BR getpid (2)).
771 .TP
772 .B referral <url>
773 Specify the referral to pass back when
774 .BR slapd (8)
775 cannot find a local database to handle a request.
776 If specified multiple times, each url is provided.
777 .TP
778 .B require <conditions>
779 Specify a set of conditions (separated by white space) to
780 require (default none).
781 The directive may be specified globally and/or per-database;
782 databases inherit global conditions, so per-database specifications
783 are additive.
784 .B bind
785 requires bind operation prior to directory operations.
786 .B LDAPv3
787 requires session to be using LDAP version 3.
788 .B authc
789 requires authentication prior to directory operations.
790 .B SASL
791 requires SASL authentication prior to directory operations.
792 .B strong
793 requires strong authentication prior to directory operations.
794 The strong keyword allows protected "simple" authentication
795 as well as SASL authentication.
796 .B none
797 may be used to require no conditions (useful to clear out globally
798 set conditions within a particular database); it must occur first
799 in the list of conditions.
800 .TP
801 .B reverse-lookup on | off
802 Enable/disable client name unverified reverse lookup (default is 
803 .BR off 
804 if compiled with --enable-rlookups).
805 .TP
806 .B rootDSE <file>
807 Specify the name of an LDIF(5) file containing user defined attributes
808 for the root DSE.  These attributes are returned in addition to the
809 attributes normally produced by slapd.
810
811 The root DSE is an entry with information about the server and its
812 capabilities, in operational attributes.
813 It has the empty DN, and can be read with e.g.:
814 .ti +4
815 ldapsearch -x -b "" -s base "+"
816 .br
817 See RFC 4512 section 5.1 for details.
818 .TP
819 .B sasl-host <fqdn>
820 Used to specify the fully qualified domain name used for SASL processing.
821 .TP
822 .B sasl-realm <realm>
823 Specify SASL realm.  Default is empty.
824 .TP
825 .B sasl-secprops <properties>
826 Used to specify Cyrus SASL security properties.
827 The
828 .B none
829 flag (without any other properties) causes the flag properties
830 default, "noanonymous,noplain", to be cleared.
831 The
832 .B noplain
833 flag disables mechanisms susceptible to simple passive attacks.
834 The
835 .B noactive
836 flag disables mechanisms susceptible to active attacks.
837 The
838 .B nodict
839 flag disables mechanisms susceptible to passive dictionary attacks.
840 The
841 .B noanonymous
842 flag disables mechanisms which support anonymous login.
843 The
844 .B forwardsec
845 flag require forward secrecy between sessions.
846 The
847 .B passcred
848 require mechanisms which pass client credentials (and allow
849 mechanisms which can pass credentials to do so).
850 The
851 .B minssf=<factor> 
852 property specifies the minimum acceptable
853 .I security strength factor
854 as an integer approximate to effective key length used for
855 encryption.  0 (zero) implies no protection, 1 implies integrity
856 protection only, 56 allows DES or other weak ciphers, 112
857 allows triple DES and other strong ciphers, 128 allows RC4,
858 Blowfish and other modern strong ciphers.  The default is 0.
859 The
860 .B maxssf=<factor> 
861 property specifies the maximum acceptable
862 .I security strength factor
863 as an integer (see minssf description).  The default is INT_MAX.
864 The
865 .B maxbufsize=<size> 
866 property specifies the maximum security layer receive buffer
867 size allowed.  0 disables security layers.  The default is 65536.
868 .TP
869 .B schemadn <dn>
870 Specify the distinguished name for the subschema subentry that
871 controls the entries on this server.  The default is "cn=Subschema".
872 .TP
873 .B security <factors>
874 Specify a set of security strength factors (separated by white space)
875 to require (see
876 .BR sasl-secprops 's
877 .B minssf
878 option for a description of security strength factors).
879 The directive may be specified globally and/or per-database.
880 .B ssf=<n>
881 specifies the overall security strength factor.
882 .B transport=<n>
883 specifies the transport security strength factor.
884 .B tls=<n>
885 specifies the TLS security strength factor.
886 .B sasl=<n>
887 specifies the SASL security strength factor.
888 .B update_ssf=<n>
889 specifies the overall security strength factor to require for
890 directory updates.
891 .B update_transport=<n>
892 specifies the transport security strength factor to require for
893 directory updates.
894 .B update_tls=<n>
895 specifies the TLS security strength factor to require for
896 directory updates.
897 .B update_sasl=<n>
898 specifies the SASL security strength factor to require for
899 directory updates.
900 .B simple_bind=<n>
901 specifies the security strength factor required for
902 .I simple
903 username/password authentication.
904 Note that the
905 .B transport
906 factor is measure of security provided by the underlying transport,
907 e.g. ldapi:// (and eventually IPSEC).  It is not normally used.
908 .TP
909 .B serverID <integer> [<URL>]
910 Specify an integer ID from 0 to 4095 for this server (limited
911 to 3 hexadecimal digits).
912 These IDs are
913 required when using multimaster replication and each master must have a
914 unique ID. Note that this requirement also applies to separate masters
915 contributing to a glued set of databases.
916 If the URL is provided, this directive may be specified
917 multiple times, providing a complete list of participating servers
918 and their IDs. The fully qualified hostname of each server should be
919 used in the supplied URLs. The IDs are used in the "replica id" field
920 of all CSNs generated by the specified server. The default value is zero.
921 Example:
922 .LP
923 .nf
924         serverID 1
925 .fi
926 .TP
927 .B sizelimit {<integer>|unlimited}
928 .TP
929 .B sizelimit size[.{soft|hard|unchecked}]=<integer> [...]
930 Specify the maximum number of entries to return from a search operation.
931 The default size limit is 500.
932 Use
933 .B unlimited
934 to specify no limits.
935 The second format allows a fine grain setting of the size limits.
936 Extra args can be added on the same line.
937 See
938 .BR limits
939 for an explanation of the different flags.
940 .TP
941 .B sockbuf_max_incoming <integer>
942 Specify the maximum incoming LDAP PDU size for anonymous sessions.
943 The default is 262143.
944 .TP
945 .B sockbuf_max_incoming_auth <integer>
946 Specify the maximum incoming LDAP PDU size for authenticated sessions.
947 The default is 4194303.
948 .TP
949 .B sortvals <attr> [...]
950 Specify a list of multi-valued attributes whose values will always
951 be maintained in sorted order. Using this option will allow Modify,
952 Compare, and filter evaluations on these attributes to be performed
953 more efficiently. The resulting sort order depends on the
954 attributes' syntax and matching rules and may not correspond to
955 lexical order or any other recognizable order.
956 .TP
957 .B threads <integer>
958 Specify the maximum size of the primary thread pool.
959 The default is 16; the minimum value is 2.
960 .TP
961 .B timelimit {<integer>|unlimited}
962 .TP
963 .B timelimit time[.{soft|hard}]=<integer> [...]
964 Specify the maximum number of seconds (in real time)
965 .B slapd
966 will spend answering a search request.  The default time limit is 3600.
967 Use
968 .B unlimited
969 to specify no limits.
970 The second format allows a fine grain setting of the time limits.
971 Extra args can be added on the same line.
972 See
973 .BR limits
974 for an explanation of the different flags.
975 .TP
976 .B tool-threads <integer>
977 Specify the maximum number of threads to use in tool mode.
978 This should not be greater than the number of CPUs in the system.
979 The default is 1.
980 .\"ucdata-path is obsolete / ignored...
981 .\".TP
982 .\".B ucdata-path <path>
983 .\"Specify the path to the directory containing the Unicode character
984 .\"tables. The default path is DATADIR/ucdata.
985 .TP
986 .B writetimeout <integer>
987 Specify the number of seconds to wait before forcibly closing
988 a connection with an outstanding write. This allows recovery from
989 various network hang conditions.  A writetimeout of 0 disables this
990 feature.  The default is 0.
991 .SH TLS OPTIONS
992 If
993 .B slapd
994 is built with support for Transport Layer Security, there are more options
995 you can specify.
996 .TP
997 .B TLSCipherSuite <cipher-suite-spec>
998 Permits configuring what ciphers will be accepted and the preference order.
999 <cipher-suite-spec> should be a cipher specification for OpenSSL.  Example:
1000
1001 TLSCipherSuite HIGH:MEDIUM:+SSLv2
1002
1003 To check what ciphers a given spec selects, use:
1004
1005 .nf
1006         openssl ciphers -v <cipher-suite-spec>
1007 .fi
1008
1009 To obtain the list of ciphers in GNUtls use:
1010
1011 .nf
1012         gnutls-cli -l
1013 .fi
1014
1015 .TP
1016 .B TLSCACertificateFile <filename>
1017 Specifies the file that contains certificates for all of the Certificate
1018 Authorities that
1019 .B slapd
1020 will recognize.
1021 .TP
1022 .B TLSCACertificatePath <path>
1023 Specifies the path of a directory that contains Certificate Authority
1024 certificates in separate individual files. Usually only one of this
1025 or the TLSCACertificateFile is used. This directive is not supported
1026 when using GNUtls.
1027 .TP
1028 .B TLSCertificateFile <filename>
1029 Specifies the file that contains the
1030 .B slapd
1031 server certificate.
1032 .TP
1033 .B TLSCertificateKeyFile <filename>
1034 Specifies the file that contains the
1035 .B slapd
1036 server private key that matches the certificate stored in the
1037 .B TLSCertificateFile
1038 file.  Currently, the private key must not be protected with a password, so
1039 it is of critical importance that it is protected carefully. 
1040 .TP
1041 .B TLSDHParamFile <filename>
1042 This directive specifies the file that contains parameters for Diffie-Hellman
1043 ephemeral key exchange.  This is required in order to use a DSA certificate on
1044 the server. If multiple sets of parameters are present in the file, all of
1045 them will be processed.  Note that setting this option may also enable
1046 Anonymous Diffie-Hellman key exchanges in certain non-default cipher suites.
1047 You should append "!ADH" to your cipher suites if you have changed them
1048 from the default, otherwise no certificate exchanges or verification will
1049 be done. When using GNUtls these parameters are always generated randomly so
1050 this directive is ignored.
1051 .TP
1052 .B TLSRandFile <filename>
1053 Specifies the file to obtain random bits from when /dev/[u]random
1054 is not available.  Generally set to the name of the EGD/PRNGD socket.
1055 The environment variable RANDFILE can also be used to specify the filename.
1056 This directive is ignored with GNUtls.
1057 .TP
1058 .B TLSVerifyClient <level>
1059 Specifies what checks to perform on client certificates in an
1060 incoming TLS session, if any.
1061 The
1062 .B <level>
1063 can be specified as one of the following keywords:
1064 .RS
1065 .TP
1066 .B never
1067 This is the default.
1068 .B slapd
1069 will not ask the client for a certificate.
1070 .TP
1071 .B allow
1072 The client certificate is requested.  If no certificate is provided,
1073 the session proceeds normally.  If a bad certificate is provided,
1074 it will be ignored and the session proceeds normally.
1075 .TP
1076 .B try
1077 The client certificate is requested.  If no certificate is provided,
1078 the session proceeds normally.  If a bad certificate is provided,
1079 the session is immediately terminated.
1080 .TP
1081 .B demand | hard | true
1082 These keywords are all equivalent, for compatibility reasons.
1083 The client certificate is requested.  If no certificate is provided,
1084 or a bad certificate is provided, the session is immediately terminated.
1085
1086 Note that a valid client certificate is required in order to use the
1087 SASL EXTERNAL authentication mechanism with a TLS session.  As such,
1088 a non-default
1089 .B TLSVerifyClient
1090 setting must be chosen to enable SASL EXTERNAL authentication.
1091 .RE
1092 .TP
1093 .B TLSCRLCheck <level>
1094 Specifies if the Certificate Revocation List (CRL) of the CA should be 
1095 used to verify if the client certificates have not been revoked. This
1096 requires
1097 .B TLSCACertificatePath
1098 parameter to be set. This directive is ignored with GNUtls.
1099 .B <level>
1100 can be specified as one of the following keywords:
1101 .RS
1102 .TP
1103 .B none
1104 No CRL checks are performed
1105 .TP
1106 .B peer
1107 Check the CRL of the peer certificate
1108 .TP
1109 .B all
1110 Check the CRL for a whole certificate chain
1111 .RE
1112 .TP
1113 .B TLSCRLFile <filename>
1114 Specifies a file containing a Certificate Revocation List to be used
1115 for verifying that certificates have not been revoked. This directive is
1116 only valid when using GNUtls.
1117 .SH GENERAL BACKEND OPTIONS
1118 Options in this section only apply to the configuration file section
1119 for the specified backend.  They are supported by every
1120 type of backend.
1121 .TP
1122 .B backend <databasetype>
1123 Mark the beginning of a backend definition. <databasetype>
1124 should be one of
1125 .BR bdb ,
1126 .BR config ,
1127 .BR dnssrv ,
1128 .BR hdb ,
1129 .BR ldap ,
1130 .BR ldif ,
1131 .BR meta ,
1132 .BR monitor ,
1133 .BR null ,
1134 .BR passwd ,
1135 .BR perl ,
1136 .BR relay ,
1137 .BR shell ,
1138 or
1139 .BR sql ,
1140 depending on which backend will serve the database.
1141
1142 .SH GENERAL DATABASE OPTIONS
1143 Options in this section only apply to the configuration file section
1144 for the database in which they are defined.  They are supported by every
1145 type of backend.  Note that the
1146 .B database
1147 and at least one
1148 .B suffix
1149 option are mandatory for each database.
1150 .TP
1151 .B database <databasetype>
1152 Mark the beginning of a new database instance definition. <databasetype>
1153 should be one of
1154 .BR bdb ,
1155 .BR config ,
1156 .BR dnssrv ,
1157 .BR hdb ,
1158 .BR ldap ,
1159 .BR ldif ,
1160 .BR meta ,
1161 .BR monitor ,
1162 .BR null ,
1163 .BR passwd ,
1164 .BR perl ,
1165 .BR relay ,
1166 .BR shell ,
1167 or
1168 .BR sql ,
1169 depending on which backend will serve the database.
1170
1171 LDAP operations, even subtree searches, normally access only one
1172 database.
1173 That can be changed by gluing databases together with the
1174 .B subordinate
1175 keyword.
1176 Access controls and some overlays can also involve multiple databases.
1177 .TP
1178 .B add_content_acl on | off
1179 Controls whether Add operations will perform ACL checks on
1180 the content of the entry being added. This check is off
1181 by default. See the
1182 .BR slapd.access (5)
1183 manual page for more details on ACL requirements for
1184 Add operations.
1185 .TP
1186 .B hidden on | off
1187 Controls whether the database will be used to answer
1188 queries. A database that is hidden will never be
1189 selected to answer any queries, and any suffix configured
1190 on the database will be ignored in checks for conflicts
1191 with other databases. By default, hidden is off.
1192 .TP
1193 .B lastmod on | off
1194 Controls whether
1195 .B slapd
1196 will automatically maintain the 
1197 modifiersName, modifyTimestamp, creatorsName, and 
1198 createTimestamp attributes for entries. It also controls
1199 the entryCSN and entryUUID attributes, which are needed
1200 by the syncrepl provider. By default, lastmod is on.
1201 .TP
1202 .B limits <selector> <limit> [<limit> [...]]
1203 Specify time and size limits based on the operation's initiator or
1204 base DN.
1205 The argument
1206 .B <selector>
1207 can be any of
1208 .RS
1209 .RS
1210 .TP
1211 anonymous | users | [<dnspec>=]<pattern> | group[/oc[/at]]=<pattern>
1212
1213 .RE
1214 with
1215 .RS
1216 .TP
1217 <dnspec> ::= dn[.<type>][.<style>]
1218 .TP
1219 <type>  ::= self | this
1220 .TP
1221 <style> ::= exact | base | onelevel | subtree | children | regex | anonymous
1222
1223 .RE
1224 DN type
1225 .B self
1226 is the default and means the bound user, while
1227 .B this
1228 means the base DN of the operation.
1229 The term
1230 .B anonymous
1231 matches all unauthenticated clients.
1232 The term
1233 .B users
1234 matches all authenticated clients;
1235 otherwise an
1236 .B exact
1237 dn pattern is assumed unless otherwise specified by qualifying 
1238 the (optional) key string
1239 .B dn
1240 with 
1241 .B exact
1242 or
1243 .B base
1244 (which are synonyms), to require an exact match; with
1245 .BR onelevel , 
1246 to require exactly one level of depth match; with
1247 .BR subtree ,
1248 to allow any level of depth match, including the exact match; with
1249 .BR children ,
1250 to allow any level of depth match, not including the exact match;
1251 .BR regex
1252 explicitly requires the (default) match based on POSIX (''extended'')
1253 regular expression pattern.
1254 Finally,
1255 .B anonymous
1256 matches unbound operations; the 
1257 .B pattern
1258 field is ignored.
1259 The same behavior is obtained by using the 
1260 .B anonymous
1261 form of the
1262 .B <selector>
1263 clause.
1264 The term
1265 .BR group ,
1266 with the optional objectClass
1267 .B oc
1268 and attributeType
1269 .B at
1270 fields, followed by
1271 .BR pattern ,
1272 sets the limits for any DN listed in the values of the
1273 .B at
1274 attribute (default
1275 .BR member )
1276 of the 
1277 .B oc
1278 group objectClass (default
1279 .BR groupOfNames )
1280 whose DN exactly matches
1281 .BR pattern .
1282
1283 The currently supported limits are 
1284 .B size
1285 and 
1286 .BR time .
1287
1288 The syntax for time limits is 
1289 .BR time[.{soft|hard}]=<integer> ,
1290 where 
1291 .I integer
1292 is the number of seconds slapd will spend answering a search request.
1293 If no time limit is explicitly requested by the client, the 
1294 .BR soft
1295 limit is used; if the requested time limit exceeds the
1296 .BR hard
1297 .\"limit, an
1298 .\".I "Administrative limit exceeded"
1299 .\"error is returned.
1300 limit, the value of the limit is used instead.
1301 If the
1302 .BR hard
1303 limit is set to the keyword 
1304 .IR soft ,
1305 the soft limit is used in either case; if it is set to the keyword 
1306 .IR unlimited , 
1307 no hard limit is enforced.
1308 Explicit requests for time limits smaller or equal to the
1309 .BR hard 
1310 limit are honored.
1311 If no limit specifier is set, the value is assigned to the 
1312 .BR soft 
1313 limit, and the
1314 .BR hard
1315 limit is set to
1316 .IR soft ,
1317 to preserve the original behavior.
1318
1319 The syntax for size limits is
1320 .BR size[.{soft|hard|unchecked}]=<integer> ,
1321 where
1322 .I integer
1323 is the maximum number of entries slapd will return answering a search 
1324 request.
1325 If no size limit is explicitly requested by the client, the
1326 .BR soft
1327 limit is used; if the requested size limit exceeds the
1328 .BR hard
1329 .\"limit, an 
1330 .\".I "Administrative limit exceeded"
1331 .\"error is returned.
1332 limit, the value of the limit is used instead.
1333 If the 
1334 .BR hard
1335 limit is set to the keyword 
1336 .IR soft , 
1337 the soft limit is used in either case; if it is set to the keyword
1338 .IR unlimited , 
1339 no hard limit is enforced.
1340 Explicit requests for size limits smaller or equal to the
1341 .BR hard
1342 limit are honored.
1343 The
1344 .BR unchecked
1345 specifier sets a limit on the number of candidates a search request is allowed
1346 to examine.
1347 The rationale behind it is that searches for non-properly indexed
1348 attributes may result in large sets of candidates, which must be 
1349 examined by
1350 .BR slapd (8)
1351 to determine whether they match the search filter or not.
1352 The
1353 .B unchecked
1354 limit provides a means to drop such operations before they are even 
1355 started.
1356 If the selected candidates exceed the 
1357 .BR unchecked
1358 limit, the search will abort with 
1359 .IR "Unwilling to perform" .
1360 If it is set to the keyword 
1361 .IR unlimited , 
1362 no limit is applied (the default).
1363 If it is set to
1364 .IR disabled ,
1365 the search is not even performed; this can be used to disallow searches
1366 for a specific set of users.
1367 If no limit specifier is set, the value is assigned to the
1368 .BR soft 
1369 limit, and the
1370 .BR hard
1371 limit is set to
1372 .IR soft ,
1373 to preserve the original behavior.
1374
1375 In case of no match, the global limits are used.
1376 The default values are the same as for
1377 .B sizelimit
1378 and
1379 .BR timelimit ;
1380 no limit is set on 
1381 .BR unchecked .
1382
1383 If 
1384 .B pagedResults
1385 control is requested, the 
1386 .B hard
1387 size limit is used by default, because the request of a specific page size
1388 is considered an explicit request for a limitation on the number
1389 of entries to be returned.
1390 However, the size limit applies to the total count of entries returned within
1391 the search, and not to a single page.
1392 Additional size limits may be enforced; the syntax is
1393 .BR size.pr={<integer>|noEstimate|unlimited} ,
1394 where
1395 .I integer
1396 is the max page size if no explicit limit is set; the keyword
1397 .I noEstimate
1398 inhibits the server from returning an estimate of the total number
1399 of entries that might be returned
1400 (note: the current implementation does not return any estimate).
1401 The keyword
1402 .I unlimited
1403 indicates that no limit is applied to the pagedResults control page size.
1404 The syntax
1405 .B size.prtotal={<integer>|unlimited|disabled}
1406 allows to set a limit on the total number of entries that a pagedResults
1407 control allows to return.
1408 By default it is set to the 
1409 .B hard
1410 limit.
1411 When set, 
1412 .I integer
1413 is the max number of entries that the whole search with pagedResults control
1414 can return.
1415 Use 
1416 .I unlimited
1417 to allow unlimited number of entries to be returned, e.g. to allow
1418 the use of the pagedResults control as a means to circumvent size 
1419 limitations on regular searches; the keyword
1420 .I disabled
1421 disables the control, i.e. no paged results can be returned.
1422 Note that the total number of entries returned when the pagedResults control 
1423 is requested cannot exceed the 
1424 .B hard 
1425 size limit of regular searches unless extended by the
1426 .B prtotal
1427 switch.
1428
1429 The \fBlimits\fP statement is typically used to let an unlimited
1430 number of entries be returned by searches performed
1431 with the identity used by the consumer for synchronization purposes
1432 by means of the RFC 4533 LDAP Content Synchronization protocol
1433 (see \fBsyncrepl\fP for details).
1434 .RE
1435 .TP
1436 .B maxderefdepth <depth>
1437 Specifies the maximum number of aliases to dereference when trying to
1438 resolve an entry, used to avoid infinite alias loops. The default is 15.
1439 .TP
1440 .B mirrormode on | off
1441 This option puts a replica database into "mirror" mode.  Update
1442 operations will be accepted from any user, not just the updatedn.  The
1443 database must already be configured as a syncrepl consumer
1444 before this keyword may be set. This mode also requires a
1445 .B serverID
1446 (see above) to be configured.
1447 By default, mirrormode is off.
1448 .TP
1449 .B monitoring on | off
1450 This option enables database-specific monitoring in the entry related
1451 to the current database in the "cn=Databases,cn=Monitor" subtree 
1452 of the monitor database, if the monitor database is enabled.
1453 Currently, only the BDB and the HDB databases provide database-specific
1454 monitoring.
1455 The default depends on the backend type.
1456 .TP
1457 .B overlay <overlay-name>
1458 Add the specified overlay to this database. An overlay is a piece of
1459 code that intercepts database operations in order to extend or change
1460 them. Overlays are pushed onto
1461 a stack over the database, and so they will execute in the reverse
1462 of the order in which they were configured and the database itself
1463 will receive control last of all. See the
1464 .BR slapd.overlays (5)
1465 manual page for an overview of the available overlays.
1466 Note that all of the database's
1467 regular settings should be configured before any overlay settings.
1468 .TP
1469 .B readonly on | off
1470 This option puts the database into "read-only" mode.  Any attempts to 
1471 modify the database will return an "unwilling to perform" error.  By
1472 default, readonly is off.
1473 .TP
1474 .B restrict <oplist>
1475 Specify a whitespace separated list of operations that are restricted.
1476 If defined inside a database specification, restrictions apply only
1477 to that database, otherwise they are global.
1478 Operations can be any of 
1479 .BR add ,
1480 .BR bind ,
1481 .BR compare ,
1482 .BR delete ,
1483 .BR extended[=<OID>] ,
1484 .BR modify ,
1485 .BR rename ,
1486 .BR search ,
1487 or the special pseudo-operations
1488 .B read
1489 and
1490 .BR write ,
1491 which respectively summarize read and write operations.
1492 The use of 
1493 .I restrict write
1494 is equivalent to 
1495 .I readonly on
1496 (see above).
1497 The 
1498 .B extended
1499 keyword allows to indicate the OID of the specific operation
1500 to be restricted.
1501 .TP
1502 .B rootdn <dn>
1503 Specify the distinguished name that is not subject to access control 
1504 or administrative limit restrictions for operations on this database.
1505 This DN may or may not be associated with an entry.  An empty root
1506 DN (the default) specifies no root access is to be granted.  It is
1507 recommended that the rootdn only be specified when needed (such as
1508 when initially populating a database).  If the rootdn is within
1509 a namingContext (suffix) of the database, a simple bind password
1510 may also be provided using the
1511 .B rootpw
1512 directive. Many optional features, including syncrepl, require the
1513 rootdn to be defined for the database.
1514 .TP
1515 .B rootpw <password>
1516 Specify a password (or hash of the password) for the rootdn.  The
1517 password can only be set if the rootdn is within the namingContext
1518 (suffix) of the database.
1519 This option accepts all RFC 2307 userPassword formats known to
1520 the server (see 
1521 .B password-hash
1522 description) as well as cleartext.
1523 .BR slappasswd (8) 
1524 may be used to generate a hash of a password.  Cleartext
1525 and \fB{CRYPT}\fP passwords are not recommended.  If empty
1526 (the default), authentication of the root DN is by other means
1527 (e.g. SASL).  Use of SASL is encouraged.
1528 .TP
1529 .B suffix <dn suffix>
1530 Specify the DN suffix of queries that will be passed to this 
1531 backend database.  Multiple suffix lines can be given and at least one is 
1532 required for each database definition.
1533
1534 If the suffix of one database is "inside" that of another, the database
1535 with the inner suffix must come first in the configuration file.
1536 You may also want to glue such databases together with the
1537 .B subordinate
1538 keyword.
1539 .TP
1540 .B subordinate [advertise]
1541 Specify that the current backend database is a subordinate of another
1542 backend database. A subordinate  database may have only one suffix. This
1543 option may be used to glue multiple databases into a single namingContext.
1544 If the suffix of the current database is within the namingContext of a
1545 superior database, searches against the superior database will be
1546 propagated to the subordinate as well. All of the databases
1547 associated with a single namingContext should have identical rootdns.
1548 Behavior of other LDAP operations is unaffected by this setting. In
1549 particular, it is not possible to use moddn to move an entry from
1550 one subordinate to another subordinate within the namingContext.
1551
1552 If the optional \fBadvertise\fP flag is supplied, the naming context of
1553 this database is advertised in the root DSE. The default is to hide this
1554 database context, so that only the superior context is visible.
1555
1556 If the slap tools
1557 .BR slapcat (8),
1558 .BR slapadd (8),
1559 or
1560 .BR slapindex (8)
1561 are used on the superior database, any glued subordinates that support
1562 these tools are opened as well.
1563
1564 Databases that are glued together should usually be configured with the
1565 same indices (assuming they support indexing), even for attributes that
1566 only exist in some of these databases. In general, all of the glued
1567 databases should be configured as similarly as possible, since the intent
1568 is to provide the appearance of a single directory.
1569
1570 Note that the \fIsubordinate\fP functionality is implemented internally
1571 by the \fIglue\fP overlay and as such its behavior will interact with other
1572 overlays in use. By default, the glue overlay is automatically configured as
1573 the last overlay on the superior backend. Its position on the backend
1574 can be explicitly configured by setting an \fBoverlay glue\fP directive
1575 at the desired position. This explicit configuration is necessary e.g.
1576 when using the \fIsyncprov\fP overlay, which needs to follow \fIglue\fP
1577 in order to work over all of the glued databases. E.g.
1578 .RS
1579 .nf
1580         database bdb
1581         suffix dc=example,dc=com
1582         ...
1583         overlay glue
1584         overlay syncprov
1585 .fi
1586 .RE
1587 .HP
1588 .hy 0
1589 .B syncrepl rid=<replica ID>
1590 .B provider=ldap[s]://<hostname>[:port]
1591 .B searchbase=<base DN>
1592 .B [type=refreshOnly|refreshAndPersist]
1593 .B [interval=dd:hh:mm:ss]
1594 .B [retry=[<retry interval> <# of retries>]+]
1595 .B [filter=<filter str>]
1596 .B [scope=sub|one|base|subord]
1597 .B [attrs=<attr list>]
1598 .B [attrsonly]
1599 .B [sizelimit=<limit>]
1600 .B [timelimit=<limit>]
1601 .B [schemachecking=on|off]
1602 .B [network-timeout=<seconds>]
1603 .B [timeout=<seconds>]
1604 .B [bindmethod=simple|sasl]
1605 .B [binddn=<dn>]
1606 .B [saslmech=<mech>]
1607 .B [authcid=<identity>]
1608 .B [authzid=<identity>]
1609 .B [credentials=<passwd>]
1610 .B [realm=<realm>]
1611 .B [secprops=<properties>]
1612 .B [starttls=yes|critical]
1613 .B [tls_cert=<file>]
1614 .B [tls_key=<file>]
1615 .B [tls_cacert=<file>]
1616 .B [tls_cacertdir=<path>]
1617 .B [tls_reqcert=never|allow|try|demand]
1618 .B [tls_ciphersuite=<ciphers>]
1619 .B [tls_crlcheck=none|peer|all]
1620 .B [logbase=<base DN>]
1621 .B [logfilter=<filter str>]
1622 .B [syncdata=default|accesslog|changelog]
1623 .RS
1624 Specify the current database as a replica which is kept up-to-date with the 
1625 master content by establishing the current
1626 .BR slapd (8)
1627 as a replication consumer site running a
1628 .B syncrepl
1629 replication engine.
1630 The replica content is kept synchronized to the master content using
1631 the LDAP Content Synchronization protocol. Refer to the
1632 "OpenLDAP Administrator's Guide" for detailed information on
1633 setting up a replicated
1634 .B slapd
1635 directory service using the 
1636 .B syncrepl
1637 replication engine.
1638
1639 .B rid
1640 identifies the current
1641 .B syncrepl
1642 directive within the replication consumer site.
1643 It is a non-negative integer not greater than 4095 (limited
1644 to three hexadecimal digits).
1645
1646 .B provider
1647 specifies the replication provider site containing the master content
1648 as an LDAP URI. If <port> is not given, the standard LDAP port number
1649 (389 or 636) is used.
1650
1651 The content of the
1652 .B syncrepl
1653 replica is defined using a search
1654 specification as its result set. The consumer
1655 .B slapd
1656 will send search requests to the provider
1657 .B slapd
1658 according to the search specification. The search specification includes
1659 .BR searchbase ", " scope ", " filter ", " attrs ", " attrsonly ", " sizelimit ", "
1660 and
1661 .B timelimit
1662 parameters as in the normal search specification. 
1663 The \fBscope\fP defaults to \fBsub\fP, the \fBfilter\fP defaults to
1664 \fB(objectclass=*)\fP, while there is no default \fBsearchbase\fP. The
1665 \fBattrs\fP list defaults to \fB"*,+"\fP to return all user and operational
1666 attributes, and \fBattrsonly\fP is unset by default.
1667 The \fBsizelimit\fP and \fBtimelimit\fP only
1668 accept "unlimited" and positive integers, and both default to "unlimited".
1669 The \fBsizelimit\fP and \fBtimelimit\fP parameters define
1670 a consumer requested limitation on the number of entries that can be returned
1671 by the LDAP Content Synchronization operation; as such, it is intended
1672 to implement partial replication based on the size of the replicated database
1673 and on the time required by the synchronization.
1674 Note, however, that any provider-side limits for the replication identity
1675 will be enforced by the provider regardless of the limits requested
1676 by the LDAP Content Synchronization operation, much like for any other
1677 search operation.
1678
1679 The LDAP Content Synchronization protocol has two operation types.
1680 In the
1681 .B refreshOnly
1682 operation, the next synchronization search operation
1683 is periodically rescheduled at an interval time (specified by 
1684 .B interval
1685 parameter; 1 day by default)
1686 after each synchronization operation finishes.
1687 In the
1688 .B refreshAndPersist
1689 operation, a synchronization search remains persistent in the provider slapd.
1690 Further updates to the master replica will generate
1691 .B searchResultEntry
1692 to the consumer slapd as the search responses to the persistent
1693 synchronization search.
1694
1695 If an error occurs during replication, the consumer will attempt to
1696 reconnect according to the
1697 .B retry
1698 parameter which is a list of the <retry interval> and <# of retries> pairs.
1699 For example, retry="60 10 300 3" lets the consumer retry every 60 seconds
1700 for the first 10 times and then retry every 300 seconds for the next 3
1701 times before stop retrying. The `+' in <# of retries> means indefinite
1702 number of retries until success.
1703 If no 
1704 .B retry
1705 was specified, by default syncrepl retries every hour forever.
1706
1707 The schema checking can be enforced at the LDAP Sync
1708 consumer site by turning on the
1709 .B schemachecking
1710 parameter. The default is \fBoff\fP.
1711 Schema checking \fBon\fP means that replicated entries must have
1712 a structural objectClass, must obey to objectClass requirements
1713 in terms of required/allowed attributes, and that naming attributes
1714 and distinguished values must be present.
1715 As a consequence, schema checking should be \fBoff\fP when partial
1716 replication is used.
1717
1718 The
1719 .B network-timeout
1720 parameter sets how long the consumer will wait to establish a
1721 network connection to the provider. Once a connection is
1722 established, the
1723 .B timeout
1724 parameter determines how long the consumer will wait for the initial
1725 Bind request to complete. The defaults for these parameters come
1726 from 
1727 .BR ldap.conf (5).
1728
1729 A
1730 .B bindmethod
1731 of 
1732 .B simple
1733 requires the options 
1734 .B binddn
1735 and 
1736 .B credentials
1737 and should only be used when adequate security services
1738 (e.g. TLS or IPSEC) are in place.
1739 .B REMEMBER: simple bind credentials must be in cleartext!
1740 A
1741 .B bindmethod
1742 of
1743 .B sasl
1744 requires the option
1745 .B saslmech.
1746 Depending on the mechanism, an authentication identity and/or
1747 credentials can be specified using
1748 .B authcid
1749 and
1750 .B credentials.
1751 The
1752 .B authzid
1753 parameter may be used to specify an authorization identity.
1754 Specific security properties (as with the
1755 .B sasl-secprops
1756 keyword above) for a SASL bind can be set with the
1757 .B secprops
1758 option. A non default SASL realm can be set with the
1759 .B realm 
1760 option.
1761 The identity used for synchronization by the consumer should be allowed
1762 to receive an unlimited number of entries in response to a search request.
1763 The provider, other than allow authentication of the syncrepl identity,
1764 should grant that identity appropriate access privileges to the data 
1765 that is being replicated (\fBaccess\fP directive), and appropriate time 
1766 and size limits.
1767 This can be accomplished by either allowing unlimited \fBsizelimit\fP
1768 and \fBtimelimit\fP, or by setting an appropriate \fBlimits\fP statement
1769 in the consumer's configuration (see \fBsizelimit\fP and \fBlimits\fP
1770 for details).
1771
1772 The
1773 .B starttls
1774 parameter specifies use of the StartTLS extended operation
1775 to establish a TLS session before Binding to the provider. If the
1776 .B critical
1777 argument is supplied, the session will be aborted if the StartTLS request
1778 fails. Otherwise the syncrepl session continues without TLS. The
1779 tls_reqcert setting defaults to "demand" and the other TLS settings
1780 default to the same as the main slapd TLS settings.
1781
1782 Rather than replicating whole entries, the consumer can query logs of
1783 data modifications. This mode of operation is referred to as \fIdelta
1784 syncrepl\fP. In addition to the above parameters, the
1785 .B logbase
1786 and
1787 .B logfilter
1788 parameters must be set appropriately for the log that will be used. The
1789 .B syncdata
1790 parameter must be set to either "accesslog" if the log conforms to the
1791 .BR slapo-accesslog (5)
1792 log format, or "changelog" if the log conforms
1793 to the obsolete \fIchangelog\fP format. If the
1794 .B syncdata
1795 parameter is omitted or set to "default" then the log parameters are
1796 ignored.
1797 .RE
1798 .TP
1799 .B updatedn <dn>
1800 This option is only applicable in a slave
1801 database.
1802 It specifies the DN permitted to update (subject to access controls)
1803 the replica.  It is only needed in certain push-mode
1804 replication scenarios.  Generally, this DN
1805 .I should not
1806 be the same as the
1807 .B rootdn 
1808 used at the master.
1809 .TP
1810 .B updateref <url>
1811 Specify the referral to pass back when
1812 .BR slapd (8)
1813 is asked to modify a replicated local database.
1814 If specified multiple times, each url is provided.
1815
1816 .SH DATABASE-SPECIFIC OPTIONS
1817 Each database may allow specific configuration options; they are
1818 documented separately in the backends' manual pages. See the
1819 .BR slapd.backends (5)
1820 manual page for an overview of available backends.
1821 .SH EXAMPLES
1822 .LP
1823 Here is a short example of a configuration file:
1824 .LP
1825 .RS
1826 .nf
1827 include   SYSCONFDIR/schema/core.schema
1828 pidfile   LOCALSTATEDIR/run/slapd.pid
1829
1830 # Subtypes of "name" (e.g. "cn" and "ou") with the
1831 # option ";x-hidden" can be searched for/compared,
1832 # but are not shown.  See \fBslapd.access\fP(5).
1833 attributeoptions x-hidden lang-
1834 access to attrs=name;x-hidden by * =cs
1835
1836 # Protect passwords.  See \fBslapd.access\fP(5).
1837 access    to attrs=userPassword  by * auth
1838 # Read access to other attributes and entries.
1839 access    to *  by * read
1840
1841 database  bdb
1842 suffix    "dc=our-domain,dc=com"
1843 # The database directory MUST exist prior to
1844 # running slapd AND should only be accessible
1845 # by the slapd/tools. Mode 0700 recommended.
1846 directory LOCALSTATEDIR/openldap-data
1847 # Indices to maintain
1848 index     objectClass  eq
1849 index     cn,sn,mail   pres,eq,approx,sub
1850
1851 # We serve small clients that do not handle referrals,
1852 # so handle remote lookups on their behalf.
1853 database  ldap
1854 suffix    ""
1855 uri       ldap://ldap.some-server.com/
1856 lastmod   off
1857 .fi
1858 .RE
1859 .LP
1860 "OpenLDAP Administrator's Guide" contains a longer annotated
1861 example of a configuration file.
1862 The original ETCDIR/slapd.conf is another example.
1863 .SH FILES
1864 .TP
1865 ETCDIR/slapd.conf
1866 default slapd configuration file
1867 .SH SEE ALSO
1868 .BR ldap (3),
1869 .BR slapd\-config (5),
1870 .BR slapd.access (5),
1871 .BR slapd.backends (5),
1872 .BR slapd.overlays (5),
1873 .BR slapd.plugin (5),
1874 .BR slapd.replog (5),
1875 .BR slapd (8),
1876 .BR slapacl (8),
1877 .BR slapadd (8),
1878 .BR slapauth (8),
1879 .BR slapcat (8),
1880 .BR slapdn (8),
1881 .BR slapindex (8),
1882 .BR slappasswd (8),
1883 .BR slaptest (8).
1884 .LP
1885 "OpenLDAP Administrator's Guide" (http://www.OpenLDAP.org/doc/admin/)
1886 .SH ACKNOWLEDGEMENTS
1887 .so ../Project