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