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