]> git.sur5r.net Git - openldap/blob - doc/man/man5/slapd-config.5
ITS#5269 fixes from Guillaume Rousse at inria.fr
[openldap] / doc / man / man5 / slapd-config.5
1 .TH SLAPD-CONFIG 5 "RELEASEDATE" "OpenLDAP LDVERSION"
2 .\" Copyright 1998-2007 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.
455 .TP
456 .B olcIndexIntLen: <integer>
457 Specify the key length for ordered integer indices. The most significant
458 bytes of the binary integer will be used for index keys. The default
459 value is 4, which provides exact indexing for 31 bit values.
460 A floating point representation is used to index too large values.
461 .TP
462 .B olcIndexSubstrIfMaxlen: <integer>
463 Specify the maximum length for subinitial and subfinal indices. Only
464 this many characters of an attribute value will be processed by the
465 indexing functions; any excess characters are ignored. The default is 4.
466 .TP
467 .B olcIndexSubstrIfMinlen: <integer>
468 Specify the minimum length for subinitial and subfinal indices. An
469 attribute value must have at least this many characters in order to be
470 processed by the indexing functions. The default is 2.
471 .TP
472 .B olcIndexSubstrAnyLen: <integer>
473 Specify the length used for subany indices. An attribute value must have
474 at least this many characters in order to be processed. Attribute values
475 longer than this length will be processed in segments of this length. The
476 default is 4. The subany index will also be used in subinitial and
477 subfinal index lookups when the filter string is longer than the
478 .I olcIndexSubstrIfMaxlen
479 value.
480 .TP
481 .B olcIndexSubstrAnyStep: <integer>
482 Specify the steps used in subany index lookups. This value sets the offset
483 for the segments of a filter string that are processed for a subany index
484 lookup. The default is 2. For example, with the default values, a search
485 using this filter "cn=*abcdefgh*" would generate index lookups for
486 "abcd", "cdef", and "efgh".
487
488 .LP
489 Note: Indexing support depends on the particular backend in use. Also,
490 changing these settings will generally require deleting any indices that
491 depend on these parameters and recreating them with
492 .BR slapindex (8).
493
494 .TP
495 .B olcLocalSSF: <SSF>
496 Specifies the Security Strength Factor (SSF) to be given local LDAP sessions,
497 such as those to the ldapi:// listener.  For a description of SSF values,
498 see 
499 .BR olcSaslSecProps 's
500 .B minssf
501 option description.  The default is 71.
502 .TP
503 .B olcLogFile: <filename>
504 Specify a file for recording debug log messages. By default these messages
505 only go to stderr and are not recorded anywhere else. Specifying a logfile
506 copies messages to both stderr and the logfile.
507 .TP
508 .B olcLogLevel: <integer> [...]
509 Specify the level at which debugging statements and operation 
510 statistics should be syslogged (currently logged to the
511 .BR syslogd (8) 
512 LOG_LOCAL4 facility).
513 They must be considered subsystems rather than increasingly verbose 
514 log levels.
515 Some messages with higher priority are logged regardless 
516 of the configured loglevel as soon as any logging is configured.
517 Log levels are additive, and available levels are:
518 .RS
519 .RS
520 .PD 0
521 .TP
522 .B 1
523 .B (0x1 trace)
524 trace function calls
525 .TP
526 .B 2
527 .B (0x2 packets)
528 debug packet handling
529 .TP
530 .B 4
531 .B (0x4 args)
532 heavy trace debugging (function args)
533 .TP
534 .B 8
535 .B (0x8 conns)
536 connection management
537 .TP
538 .B 16
539 .B (0x10 BER)
540 print out packets sent and received
541 .TP
542 .B 32
543 .B (0x20 filter)
544 search filter processing
545 .TP
546 .B 64
547 .B (0x40 config)
548 configuration file processing
549 .TP
550 .B 128
551 .B (0x80 ACL)
552 access control list processing
553 .TP
554 .B 256
555 .B (0x100 stats)
556 stats log connections/operations/results
557 .TP
558 .B 512
559 .B (0x200 stats2)
560 stats log entries sent
561 .TP
562 .B 1024
563 .B (0x400 shell)
564 print communication with shell backends
565 .TP
566 .B 2048
567 .B (0x800 parse)
568 entry parsing
569 \".TP
570 \".B 4096
571 \".B (0x1000 cache)
572 \"caching (unused)
573 \".TP
574 \".B 8192
575 \".B (0x2000 index)
576 \"data indexing (unused)
577 .TP
578 .B 16384
579 .B (0x4000 sync)
580 LDAPSync replication
581 .TP
582 .B 32768
583 .B (0x8000 none)
584 only messages that get logged whatever log level is set
585 .PD
586 .RE
587 The desired log level can be input as a single integer that combines 
588 the (ORed) desired levels, both in decimal or in hexadecimal notation,
589 as a list of integers (that are ORed internally),
590 or as a list of the names that are shown between brackets, such that
591 .LP
592 .nf
593     olcLogLevel: 129
594     olcLogLevel: 0x81
595     olcLogLevel: 128 1
596     olcLogLevel: 0x80 0x1
597     olcLogLevel: acl trace
598 .fi
599 .LP
600 are equivalent.
601 The keyword 
602 .B any
603 can be used as a shortcut to enable logging at all levels (equivalent to -1).
604 The keyword
605 .BR none ,
606 or the equivalent integer representation, causes those messages
607 that are logged regardless of the configured olcLogLevel to be logged.
608 In fact, if no olcLogLevel (or a 0 level) is defined, no logging occurs, 
609 so at least the 
610 .B none
611 level is required to have high priority messages logged.
612 .RE
613 .TP
614 .B olcPasswordCryptSaltFormat: <format>
615 Specify the format of the salt passed to
616 .BR crypt (3)
617 when generating {CRYPT} passwords (see
618 .BR olcPasswordHash )
619 during processing of LDAP Password Modify Extended Operations (RFC 3062).
620
621 This string needs to be in
622 .BR sprintf (3)
623 format and may include one (and only one) %s conversion.
624 This conversion will be substituted with a string of random
625 characters from [A\-Za\-z0\-9./].  For example, "%.2s"
626 provides a two character salt and "$1$%.8s" tells some
627 versions of crypt(3) to use an MD5 algorithm and provides
628 8 random characters of salt.  The default is "%s", which
629 provides 31 characters of salt.
630 .TP
631 .B olcPidFile: <filename>
632 The ( absolute ) name of a file that will hold the 
633 .B slapd
634 server's process ID ( see
635 .BR getpid (2)
636 ) if started without the debugging command line option.
637 .TP
638 .B olcPluginLogFile: <filename>
639 The ( absolute ) name of a file that will contain log
640 messages from
641 .B SLAPI
642 plugins. See
643 .BR slapd.plugin (5)
644 for details.
645 .TP
646 .B olcReferral: <url>
647 Specify the referral to pass back when
648 .BR slapd (8)
649 cannot find a local database to handle a request.
650 If multiple values are specified, each url is provided.
651 .TP
652 .B olcReverseLookup: TRUE | FALSE
653 Enable/disable client name unverified reverse lookup (default is 
654 .BR FALSE 
655 if compiled with --enable-rlookups).
656 .TP
657 .B olcRootDSE: <file>
658 Specify the name of an LDIF(5) file containing user defined attributes
659 for the root DSE.  These attributes are returned in addition to the
660 attributes normally produced by slapd.
661
662 The root DSE is an entry with information about the server and its
663 capabilities, in operational attributes.
664 It has the empty DN, and can be read with e.g.:
665 .ti +4
666 ldapsearch -x -b "" -s base "+"
667 .br
668 See RFC 4512 section 5.1 for details.
669 .TP
670 .B olcSaslHost: <fqdn>
671 Used to specify the fully qualified domain name used for SASL processing.
672 .TP
673 .B olcSaslRealm: <realm>
674 Specify SASL realm.  Default is empty.
675 .TP
676 .B olcSaslSecProps: <properties>
677 Used to specify Cyrus SASL security properties.
678 The
679 .B none
680 flag (without any other properties) causes the flag properties
681 default, "noanonymous,noplain", to be cleared.
682 The
683 .B noplain
684 flag disables mechanisms susceptible to simple passive attacks.
685 The
686 .B noactive
687 flag disables mechanisms susceptible to active attacks.
688 The
689 .B nodict
690 flag disables mechanisms susceptible to passive dictionary attacks.
691 The
692 .B noanonymous
693 flag disables mechanisms which support anonymous login.
694 The
695 .B forwardsec
696 flag require forward secrecy between sessions.
697 The
698 .B passcred
699 require mechanisms which pass client credentials (and allow
700 mechanisms which can pass credentials to do so).
701 The
702 .B minssf=<factor> 
703 property specifies the minimum acceptable
704 .I security strength factor
705 as an integer approximate to effective key length used for
706 encryption.  0 (zero) implies no protection, 1 implies integrity
707 protection only, 56 allows DES or other weak ciphers, 112
708 allows triple DES and other strong ciphers, 128 allows RC4,
709 Blowfish and other modern strong ciphers.  The default is 0.
710 The
711 .B maxssf=<factor> 
712 property specifies the maximum acceptable
713 .I security strength factor
714 as an integer (see minssf description).  The default is INT_MAX.
715 The
716 .B maxbufsize=<size> 
717 property specifies the maximum security layer receive buffer
718 size allowed.  0 disables security layers.  The default is 65536.
719 .TP
720 .B olcServerID: <integer> [<URL>]
721 Specify an integer ID from 0 to 4095 for this server. These IDs are
722 required when using multimaster replication and each master must have a
723 unique ID. If the URL is provided, this directive may be specified
724 multiple times, providing a complete list of participating servers
725 and their IDs. The fully qualified hostname of each server should be
726 used in the supplied URLs. The IDs are used in the "replica id" field
727 of all CSNs generated by the specified server. The default value is zero.
728 Example:
729 .LP
730 .nf
731         olcServerID: 1 ldap://ldap1.example.com
732         olcServerID: 2 ldap://ldap2.example.com
733 .fi
734 .TP
735 .B olcSockbufMaxIncoming: <integer>
736 Specify the maximum incoming LDAP PDU size for anonymous sessions.
737 The default is 262143.
738 .TP
739 .B olcSockbufMaxIncomingAuth: <integer>
740 Specify the maximum incoming LDAP PDU size for authenticated sessions.
741 The default is 4194303.
742 .TP
743 .B olcThreads: <integer>
744 Specify the maximum size of the primary thread pool.
745 The default is 16; the minimum value is 2.
746 .TP
747 .B olcToolThreads: <integer>
748 Specify the maximum number of threads to use in tool mode.
749 This should not be greater than the number of CPUs in the system.
750 The default is 1.
751 .\"ucdata-path is obsolete / ignored...
752 .\".TP
753 .\".B ucdata-path <path>
754 .\"Specify the path to the directory containing the Unicode character
755 .\"tables. The default path is DATADIR/ucdata.
756 .SH TLS OPTIONS
757 If
758 .B slapd
759 is built with support for Transport Layer Security, there are more options
760 you can specify.
761 .TP
762 .B olcTLSCipherSuite: <cipher-suite-spec>
763 Permits configuring what ciphers will be accepted and the preference order.
764 <cipher-suite-spec> should be a cipher specification for OpenSSL.  Example:
765
766 olcTLSCipherSuite: HIGH:MEDIUM:+SSLv2
767
768 To check what ciphers a given spec selects in OpenSSL, use:
769
770 .nf
771         openssl ciphers -v <cipher-suite-spec>
772 .fi
773
774 To obtain the list of ciphers in GNUtls use:
775
776 .nf
777         gnutls-cli -l
778 .fi
779 .TP
780 .B olcTLSCACertificateFile: <filename>
781 Specifies the file that contains certificates for all of the Certificate
782 Authorities that
783 .B slapd
784 will recognize.
785 .TP
786 .B olcTLSCACertificatePath: <path>
787 Specifies the path of a directory that contains Certificate Authority
788 certificates in separate individual files. Usually only one of this
789 or the olcTLSCACertificateFile is defined. If both are specified, both
790 locations will be used. This directive is not supported
791 when using GNUtls.
792 .TP
793 .B olcTLSCertificateFile: <filename>
794 Specifies the file that contains the
795 .B slapd
796 server certificate.
797 .TP
798 .B olcTLSCertificateKeyFile: <filename>
799 Specifies the file that contains the
800 .B slapd
801 server private key that matches the certificate stored in the
802 .B olcTLSCertificateFile
803 file. If the private key is protected with a password, the password must
804 be manually typed in when slapd starts.  Usually the private key is not
805 protected with a password, to allow slapd to start without manual
806 intervention, so
807 it is of critical importance that the file is protected carefully. 
808 .TP
809 .B olcTLSDHParamFile: <filename>
810 This directive specifies the file that contains parameters for Diffie-Hellman
811 ephemeral key exchange.  This is required in order to use a DSA certificate on
812 the server. If multiple sets of parameters are present in the file, all of
813 them will be processed.  Note that setting this option may also enable
814 Anonymous Diffie-Hellman key exchanges in certain non-default cipher suites.
815 You should append "!ADH" to your cipher suites if you have changed them
816 from the default, otherwise no certificate exchanges or verification will
817 be done. When using GNUtls these parameters are always generated randomly
818 so this directive is ignored.
819 .TP
820 .B olcTLSRandFile: <filename>
821 Specifies the file to obtain random bits from when /dev/[u]random
822 is not available.  Generally set to the name of the EGD/PRNGD socket.
823 The environment variable RANDFILE can also be used to specify the filename.
824 This directive is ignored with GNUtls.
825 .TP
826 .B olcTLSVerifyClient: <level>
827 Specifies what checks to perform on client certificates in an
828 incoming TLS session, if any.
829 The
830 .B <level>
831 can be specified as one of the following keywords:
832 .RS
833 .TP
834 .B never
835 This is the default.
836 .B slapd
837 will not ask the client for a certificate.
838 .TP
839 .B allow
840 The client certificate is requested.  If no certificate is provided,
841 the session proceeds normally.  If a bad certificate is provided,
842 it will be ignored and the session proceeds normally.
843 .TP
844 .B try
845 The client certificate is requested.  If no certificate is provided,
846 the session proceeds normally.  If a bad certificate is provided,
847 the session is immediately terminated.
848 .TP
849 .B demand | hard | true
850 These keywords are all equivalent, for compatibility reasons.
851 The client certificate is requested.  If no certificate is provided,
852 or a bad certificate is provided, the session is immediately terminated.
853
854 Note that a valid client certificate is required in order to use the
855 SASL EXTERNAL authentication mechanism with a TLS session.  As such,
856 a non-default
857 .B olcTLSVerifyClient
858 setting must be chosen to enable SASL EXTERNAL authentication.
859 .RE
860 .TP
861 .B olcTLSCRLCheck: <level>
862 Specifies if the Certificate Revocation List (CRL) of the CA should be 
863 used to verify if the client certificates have not been revoked. This
864 requires
865 .B olcTLSCACertificatePath
866 parameter to be set. This parameter is ignored with GNUtls.
867 .B <level>
868 can be specified as one of the following keywords:
869 .RS
870 .TP
871 .B none
872 No CRL checks are performed
873 .TP
874 .B peer
875 Check the CRL of the peer certificate
876 .TP
877 .B all
878 Check the CRL for a whole certificate chain
879 .RE
880 .TP
881 .B olcTLSCRLFile: <filename>
882 Specifies a file containing a Certificate Revocation List to be used
883 for verifying that certificates have not been revoked. This parameter
884 is only valid when using GNUtls.
885 .SH DYNAMIC MODULE OPTIONS
886 If
887 .B slapd
888 is compiled with --enable-modules then the module-related entries will
889 be available. These entries are named
890 .B cn=module{x},cn=config
891 and
892 must have the olcModuleList objectClass. One entry should be created
893 per
894 .B olcModulePath.
895 Normally the config engine generates the "{x}" index in the RDN
896 automatically, so it can be omitted when initially loading these entries.
897 .TP
898 .B olcModuleLoad: <filename>
899 Specify the name of a dynamically loadable module to load. The filename
900 may be an absolute path name or a simple filename. Non-absolute names
901 are searched for in the directories specified by the
902 .B olcModulePath
903 option.
904 .TP
905 .B olcModulePath: <pathspec>
906 Specify a list of directories to search for loadable modules. Typically
907 the path is colon-separated but this depends on the operating system.
908 .SH SCHEMA OPTIONS
909 Schema definitions are created as entries in the
910 .B cn=schema,cn=config
911 subtree. These entries must have the olcSchemaConfig objectClass.
912 As noted above, the actual
913 .B cn=schema,cn=config
914 entry is predefined and any values specified for it are ignored.
915
916 .HP
917 .hy 0
918 .B olcAttributetypes: "(\ <oid>\
919  [NAME\ <name>]\
920  [DESC\ <description>]\
921  [OBSOLETE]\
922  [SUP\ <oid>]\
923  [EQUALITY\ <oid>]\
924  [ORDERING\ <oid>]\
925  [SUBSTR\ <oid>]\
926  [SYNTAX\ <oidlen>]\
927  [SINGLE\-VALUE]\
928  [COLLECTIVE]\
929  [NO\-USER\-MODIFICATION]\
930  [USAGE\ <attributeUsage>]\ )"
931 .RS
932 Specify an attribute type using the LDAPv3 syntax defined in RFC 4512.
933 The slapd parser extends the RFC 4512 definition by allowing string
934 forms as well as numeric OIDs to be used for the attribute OID and
935 attribute syntax OID.
936 (See the
937 .B olcObjectIdentifier
938 description.) 
939 .RE
940
941 .HP
942 .hy 0
943 .B olcDitContentRules: "(\ <oid>\
944  [NAME\ <name>]\
945  [DESC\ <description>]\
946  [OBSOLETE]\
947  [AUX\ <oids>]\
948  [MUST\ <oids>]\
949  [MAY\ <oids>]\
950  [NOT\ <oids>]\ )"
951 .RS
952 Specify an DIT Content Rule using the LDAPv3 syntax defined in RFC 4512.
953 The slapd parser extends the RFC 4512 definition by allowing string
954 forms as well as numeric OIDs to be used for the attribute OID and
955 attribute syntax OID.
956 (See the
957 .B olcObjectIdentifier
958 description.) 
959 .RE
960
961 .HP
962 .hy 0
963 .B olcObjectClasses: "(\ <oid>\
964  [NAME\ <name>]\
965  [DESC\ <description>]\
966  [OBSOLETE]\
967  [SUP\ <oids>]\
968  [{ ABSTRACT | STRUCTURAL | AUXILIARY }]\
969  [MUST\ <oids>] [MAY\ <oids>] )"
970 .RS
971 Specify an objectclass using the LDAPv3 syntax defined in RFC 4512.
972 The slapd parser extends the RFC 4512 definition by allowing string
973 forms as well as numeric OIDs to be used for the object class OID.
974 (See the
975 .B
976 olcObjectIdentifier
977 description.)  Object classes are "STRUCTURAL" by default.
978 .RE
979 .TP
980 .B olcObjectIdentifier: <name> "{ <oid> | <name>[:<suffix>] }"
981 Define a string name that equates to the given OID. The string can be used
982 in place of the numeric OID in objectclass and attribute definitions. The
983 name can also be used with a suffix of the form ":xx" in which case the
984 value "oid.xx" will be used.
985
986 .SH GENERAL BACKEND OPTIONS
987 Options in these entries only apply to the configuration of a single
988 type of backend. All backends may support this class of options.
989 The entry must be named
990 .B olcBackend=<databasetype>,cn=config
991 and must have the olcBackendConfig objectClass.
992 <databasetype>
993 should be one of
994 .BR bdb ,
995 .BR config ,
996 .BR dnssrv ,
997 .BR hdb ,
998 .BR ldap ,
999 .BR ldif ,
1000 .BR meta ,
1001 .BR monitor ,
1002 .BR null ,
1003 .BR passwd ,
1004 .BR perl ,
1005 .BR relay ,
1006 .BR shell ,
1007 or
1008 .BR sql .
1009 At present, no backend implements any options of this type.
1010
1011 .SH DATABASE OPTIONS
1012 Database options are set in entries named
1013 .B olcDatabase={x}<databasetype>,cn=config
1014 and must have the olcDatabaseConfig objectClass. Normally the config
1015 engine generates the "{x}" index in the RDN automatically, so it
1016 can be omitted when initially loading these entries.
1017
1018 The special frontend database is always numbered "{-1}" and the config
1019 database is always numbered "{0}".
1020
1021 .SH GLOBAL DATABASE OPTIONS
1022 Options in this section may be set in the special "frontend" database
1023 and inherited in all the other databases. These options may be altered
1024 by further settings in each specific database. The frontend entry must
1025 be named
1026 .B olcDatabase=frontend,cn=config
1027 and must have the olcFrontendConfig objectClass.
1028 .TP
1029 .B olcAccess: to <what> "[ by <who> <access> <control> ]+"
1030 Grant access (specified by <access>) to a set of entries and/or
1031 attributes (specified by <what>) by one or more requestors (specified
1032 by <who>).
1033 If no access controls are present, the default policy
1034 allows anyone and everyone to read anything but restricts
1035 updates to rootdn.  (e.g., "olcAccess: to * by * read").
1036 See
1037 .BR slapd.access (5)
1038 and the "OpenLDAP Administrator's Guide" for details.
1039
1040 Access controls set in the frontend are appended to any access
1041 controls set on the specific databases.
1042 The rootdn of a database can always read and write EVERYTHING
1043 in that database.
1044
1045 Extra special care must be taken with the access controls on the
1046 config database. Unlike other databases, the default policy for the
1047 config database is to only allow access to the rootdn. Regular users
1048 should not have read access, and write access should be granted very
1049 carefully to privileged administrators.
1050
1051 .TP
1052 .B olcDefaultSearchBase: <dn>
1053 Specify a default search base to use when client submits a
1054 non-base search request with an empty base DN.
1055 Base scoped search requests with an empty base DN are not affected.
1056 This setting is only allowed in the frontend entry.
1057 .TP
1058 .B olcPasswordHash: <hash> [<hash>...]
1059 This option configures one or more hashes to be used in generation of user
1060 passwords stored in the userPassword attribute during processing of
1061 LDAP Password Modify Extended Operations (RFC 3062).
1062 The <hash> must be one of
1063 .BR {SSHA} ,
1064 .BR {SHA} ,
1065 .BR {SMD5} ,
1066 .BR {MD5} ,
1067 .BR {CRYPT} ,
1068 and
1069 .BR {CLEARTEXT} .
1070 The default is
1071 .BR {SSHA} .
1072
1073 .B {SHA}
1074 and
1075 .B {SSHA}
1076 use the SHA-1 algorithm (FIPS 160-1), the latter with a seed.
1077
1078 .B {MD5}
1079 and
1080 .B {SMD5}
1081 use the MD5 algorithm (RFC 1321), the latter with a seed.
1082
1083 .B {CRYPT}
1084 uses the
1085 .BR crypt (3).
1086
1087 .B {CLEARTEXT}
1088 indicates that the new password should be
1089 added to userPassword as clear text.
1090
1091 Note that this option does not alter the normal user applications
1092 handling of userPassword during LDAP Add, Modify, or other LDAP operations.
1093 This setting is only allowed in the frontend entry.
1094 .TP
1095 .B olcReadOnly: TRUE | FALSE
1096 This option puts the database into "read-only" mode.  Any attempts to 
1097 modify the database will return an "unwilling to perform" error.  By
1098 default, olcReadOnly is FALSE. Note that when this option is set
1099 TRUE on the frontend, it cannot be reset without restarting the
1100 server, since further writes to the config database will be rejected.
1101 .TP
1102 .B olcRequires: <conditions>
1103 Specify a set of conditions to require (default none).
1104 The directive may be specified globally and/or per-database;
1105 databases inherit global conditions, so per-database specifications
1106 are additive.
1107 .B bind
1108 requires bind operation prior to directory operations.
1109 .B LDAPv3
1110 requires session to be using LDAP version 3.
1111 .B authc
1112 requires authentication prior to directory operations.
1113 .B SASL
1114 requires SASL authentication prior to directory operations.
1115 .B strong
1116 requires strong authentication prior to directory operations.
1117 The strong keyword allows protected "simple" authentication
1118 as well as SASL authentication.
1119 .B none
1120 may be used to require no conditions (useful to clear out globally
1121 set conditions within a particular database); it must occur first
1122 in the list of conditions.
1123 .TP
1124 .B olcRestrict: <oplist>
1125 Specify a list of operations that are restricted.
1126 Restrictions on a specific database override any frontend setting.
1127 Operations can be any of 
1128 .BR add ,
1129 .BR bind ,
1130 .BR compare ,
1131 .BR delete ,
1132 .BR extended[=<OID>] ,
1133 .BR modify ,
1134 .BR rename ,
1135 .BR search ,
1136 or the special pseudo-operations
1137 .B read
1138 and
1139 .BR write ,
1140 which respectively summarize read and write operations.
1141 The use of 
1142 .I restrict write
1143 is equivalent to 
1144 .I olcReadOnly: TRUE
1145 (see above).
1146 The 
1147 .B extended
1148 keyword allows to indicate the OID of the specific operation
1149 to be restricted.
1150 .TP
1151 .B olcSchemaDN: <dn>
1152 Specify the distinguished name for the subschema subentry that
1153 controls the entries on this server.  The default is "cn=Subschema".
1154 .TP
1155 .B olcSecurity: <factors>
1156 Specify a set of security strength factors (separated by white space)
1157 to require (see
1158 .BR olcSaslSecprops 's
1159 .B minssf
1160 option for a description of security strength factors).
1161 The directive may be specified globally and/or per-database.
1162 .B ssf=<n>
1163 specifies the overall security strength factor.
1164 .B transport=<n>
1165 specifies the transport security strength factor.
1166 .B tls=<n>
1167 specifies the TLS security strength factor.
1168 .B sasl=<n>
1169 specifies the SASL security strength factor.
1170 .B update_ssf=<n>
1171 specifies the overall security strength factor to require for
1172 directory updates.
1173 .B update_transport=<n>
1174 specifies the transport security strength factor to require for
1175 directory updates.
1176 .B update_tls=<n>
1177 specifies the TLS security strength factor to require for
1178 directory updates.
1179 .B update_sasl=<n>
1180 specifies the SASL security strength factor to require for
1181 directory updates.
1182 .B simple_bind=<n>
1183 specifies the security strength factor required for
1184 .I simple
1185 username/password authentication.
1186 Note that the
1187 .B transport
1188 factor is measure of security provided by the underlying transport,
1189 e.g. ldapi:// (and eventually IPSEC).  It is not normally used.
1190 .TP
1191 .B olcSizeLimit: {<integer>|unlimited}
1192 .TP
1193 .B olcSizeLimit: size[.{soft|hard|unchecked}]=<integer> [...]
1194 Specify the maximum number of entries to return from a search operation.
1195 The default size limit is 500.
1196 Use
1197 .B unlimited
1198 to specify no limits.
1199 The second format allows a fine grain setting of the size limits.
1200 Extra args can be added in the same value or as additional values.
1201 See
1202 .BR olcLimits
1203 for an explanation of the different flags.
1204 .TP
1205 .B olcSortVals <attr> [...]
1206 Specify a list of multi-valued attributes whose values will always
1207 be maintained in sorted order. Using this option will allow Modify,
1208 Compare, and filter evaluations on these attributes to be performed
1209 more efficiently. The resulting sort order depends on the
1210 attributes' syntax and matching rules and may not correspond to
1211 lexical order or any other recognizable order.
1212 This setting is only allowed in the frontend entry.
1213 .TP
1214 .B olcTimeLimit: {<integer>|unlimited}
1215 .TP
1216 .B olcTimeLimit: time[.{soft|hard}]=<integer> [...]
1217 Specify the maximum number of seconds (in real time)
1218 .B slapd
1219 will spend answering a search request.  The default time limit is 3600.
1220 Use
1221 .B unlimited
1222 to specify no limits.
1223 The second format allows a fine grain setting of the time limits.
1224 Extra args can be added in the same value or as additional values.
1225 See
1226 .BR olcLimits
1227 for an explanation of the different flags.
1228
1229 .SH GENERAL DATABASE OPTIONS
1230 Options in this section only apply to the specific database for
1231 which they are defined.  They are supported by every
1232 type of backend. All of the Global Database Options may also be
1233 used here.
1234 .TP
1235 .B olcHidden: TRUE | FALSE
1236 Controls whether the database will be used to answer
1237 queries. A database that is hidden will never be
1238 selected to answer any queries, and any suffix configured
1239 on the database will be ignored in checks for conflicts
1240 with other databases. By default, olcHidden is FALSE.
1241 .TP
1242 .B olcLastMod: TRUE | FALSE
1243 Controls whether
1244 .B slapd
1245 will automatically maintain the 
1246 modifiersName, modifyTimestamp, creatorsName, and 
1247 createTimestamp attributes for entries. It also controls
1248 the entryCSN and entryUUID attributes, which are needed
1249 by the syncrepl provider. By default, olcLastMod is TRUE.
1250 .TP
1251 .B olcLimits: <who> <limit> [<limit> [...]]
1252 Specify time and size limits based on who initiated an operation.
1253 The argument
1254 .B who
1255 can be any of
1256 .RS
1257 .RS
1258 .TP
1259 anonymous | users | [dn[.<style>]=]<pattern> | group[/oc[/at]]=<pattern>
1260
1261 .RE
1262 with
1263 .RS
1264 .TP
1265 <style> ::= exact | base | onelevel | subtree | children | regex | anonymous
1266
1267 .RE
1268 The term
1269 .B anonymous
1270 matches all unauthenticated clients.
1271 The term
1272 .B users
1273 matches all authenticated clients;
1274 otherwise an
1275 .B exact
1276 dn pattern is assumed unless otherwise specified by qualifying 
1277 the (optional) key string
1278 .B dn
1279 with 
1280 .B exact
1281 or
1282 .B base
1283 (which are synonyms), to require an exact match; with
1284 .BR onelevel , 
1285 to require exactly one level of depth match; with
1286 .BR subtree ,
1287 to allow any level of depth match, including the exact match; with
1288 .BR children ,
1289 to allow any level of depth match, not including the exact match;
1290 .BR regex
1291 explicitly requires the (default) match based on POSIX (''extended'')
1292 regular expression pattern.
1293 Finally,
1294 .B anonymous
1295 matches unbound operations; the 
1296 .B pattern
1297 field is ignored.
1298 The same behavior is obtained by using the 
1299 .B anonymous
1300 form of the
1301 .B who
1302 clause.
1303 The term
1304 .BR group ,
1305 with the optional objectClass
1306 .B oc
1307 and attributeType
1308 .B at
1309 fields, followed by
1310 .BR pattern ,
1311 sets the limits for any DN listed in the values of the
1312 .B at
1313 attribute (default
1314 .BR member )
1315 of the 
1316 .B oc
1317 group objectClass (default
1318 .BR groupOfNames )
1319 whose DN exactly matches
1320 .BR pattern .
1321
1322 The currently supported limits are 
1323 .B size
1324 and 
1325 .BR time .
1326
1327 The syntax for time limits is 
1328 .BR time[.{soft|hard}]=<integer> ,
1329 where 
1330 .I integer
1331 is the number of seconds slapd will spend answering a search request.
1332 If no time limit is explicitly requested by the client, the 
1333 .BR soft
1334 limit is used; if the requested time limit exceeds the
1335 .BR hard
1336 .\"limit, an
1337 .\".I "Administrative limit exceeded"
1338 .\"error is returned.
1339 limit, the value of the limit is used instead.
1340 If the
1341 .BR hard
1342 limit is set to the keyword 
1343 .IR soft ,
1344 the soft limit is used in either case; if it is set to the keyword 
1345 .IR unlimited , 
1346 no hard limit is enforced.
1347 Explicit requests for time limits smaller or equal to the
1348 .BR hard 
1349 limit are honored.
1350 If no limit specifier is set, the value is assigned to the 
1351 .BR soft 
1352 limit, and the
1353 .BR hard
1354 limit is set to
1355 .IR soft ,
1356 to preserve the original behavior.
1357
1358 The syntax for size limits is
1359 .BR size[.{soft|hard|unchecked}]=<integer> ,
1360 where
1361 .I integer
1362 is the maximum number of entries slapd will return answering a search 
1363 request.
1364 If no size limit is explicitly requested by the client, the
1365 .BR soft
1366 limit is used; if the requested size limit exceeds the
1367 .BR hard
1368 .\"limit, an 
1369 .\".I "Administrative limit exceeded"
1370 .\"error is returned.
1371 limit, the value of the limit is used instead.
1372 If the 
1373 .BR hard
1374 limit is set to the keyword 
1375 .IR soft , 
1376 the soft limit is used in either case; if it is set to the keyword
1377 .IR unlimited , 
1378 no hard limit is enforced.
1379 Explicit requests for size limits smaller or equal to the
1380 .BR hard
1381 limit are honored.
1382 The
1383 .BR unchecked
1384 specifier sets a limit on the number of candidates a search request is allowed
1385 to examine.
1386 The rationale behind it is that searches for non-properly indexed
1387 attributes may result in large sets of candidates, which must be 
1388 examined by
1389 .BR slapd (8)
1390 to determine whether they match the search filter or not.
1391 The
1392 .B unchecked
1393 limit provides a means to drop such operations before they are even 
1394 started.
1395 If the selected candidates exceed the 
1396 .BR unchecked
1397 limit, the search will abort with 
1398 .IR "Unwilling to perform" .
1399 If it is set to the keyword 
1400 .IR unlimited , 
1401 no limit is applied (the default).
1402 If it is set to
1403 .IR disable ,
1404 the search is not even performed; this can be used to disallow searches
1405 for a specific set of users.
1406 If no limit specifier is set, the value is assigned to the
1407 .BR soft 
1408 limit, and the
1409 .BR hard
1410 limit is set to
1411 .IR soft ,
1412 to preserve the original behavior.
1413
1414 In case of no match, the global limits are used.
1415 The default values are the same as
1416 .B olcSizeLimit
1417 and
1418 .BR olcTimeLimit ;
1419 no limit is set on 
1420 .BR unchecked .
1421
1422 If 
1423 .B pagedResults
1424 control is requested, the 
1425 .B hard
1426 size limit is used by default, because the request of a specific page size
1427 is considered an explicit request for a limitation on the number
1428 of entries to be returned.
1429 However, the size limit applies to the total count of entries returned within
1430 the search, and not to a single page.
1431 Additional size limits may be enforced; the syntax is
1432 .BR size.pr={<integer>|noEstimate|unlimited} ,
1433 where
1434 .I integer
1435 is the max page size if no explicit limit is set; the keyword
1436 .I noEstimate
1437 inhibits the server from returning an estimate of the total number
1438 of entries that might be returned
1439 (note: the current implementation does not return any estimate).
1440 The keyword
1441 .I unlimited
1442 indicates that no limit is applied to the pagedResults control page size.
1443 The syntax
1444 .B size.prtotal={<integer>|unlimited|disabled}
1445 allows to set a limit on the total number of entries that a pagedResults
1446 control allows to return.
1447 By default it is set to the 
1448 .B hard
1449 limit.
1450 When set, 
1451 .I integer
1452 is the max number of entries that the whole search with pagedResults control
1453 can return.
1454 Use 
1455 .I unlimited
1456 to allow unlimited number of entries to be returned, e.g. to allow
1457 the use of the pagedResults control as a means to circumvent size 
1458 limitations on regular searches; the keyword
1459 .I disabled
1460 disables the control, i.e. no paged results can be returned.
1461 Note that the total number of entries returned when the pagedResults control 
1462 is requested cannot exceed the 
1463 .B hard 
1464 size limit of regular searches unless extended by the
1465 .B prtotal
1466 switch.
1467 .RE
1468 .TP
1469 .B olcMaxDerefDepth: <depth>
1470 Specifies the maximum number of aliases to dereference when trying to
1471 resolve an entry, used to avoid infinite alias loops. The default is 15.
1472 .TP
1473 .B olcMirrorMode: TRUE | FALSE
1474 This option puts a replica database into "mirror" mode.  Update
1475 operations will be accepted from any user, not just the updatedn.  The
1476 database must already be configured as syncrepl consumer
1477 before this keyword may be set.  This mode also requires a
1478 .B olcServerID
1479 (see above) to be configured.
1480 By default, this setting is FALSE.
1481 .TP
1482 .B olcPlugin: <plugin_type> <lib_path> <init_function> [<arguments>]
1483 Configure a SLAPI plugin. See the
1484 .BR slapd.plugin (5)
1485 manpage for more details.
1486 .TP
1487 .B olcRootDN: <dn>
1488 Specify the distinguished name that is not subject to access control 
1489 or administrative limit restrictions for operations on this database.
1490 This DN may or may not be associated with an entry.  An empty root
1491 DN (the default) specifies no root access is to be granted.  It is
1492 recommended that the rootdn only be specified when needed (such as
1493 when initially populating a database).  If the rootdn is within
1494 a namingContext (suffix) of the database, a simple bind password
1495 may also be provided using the
1496 .B olcRootPW
1497 directive. Note that the rootdn is always needed when using syncrepl.
1498 .TP
1499 .B olcRootPW: <password>
1500 Specify a password (or hash of the password) for the rootdn.  The
1501 password can only be set if the rootdn is within the namingContext
1502 (suffix) of the database.
1503 This option accepts all RFC 2307 userPassword formats known to
1504 the server (see 
1505 .B olcPasswordHash
1506 description) as well as cleartext.
1507 .BR slappasswd (8) 
1508 may be used to generate a hash of a password.  Cleartext
1509 and \fB{CRYPT}\fP passwords are not recommended.  If empty
1510 (the default), authentication of the root DN is by other means
1511 (e.g. SASL).  Use of SASL is encouraged.
1512 .TP
1513 .B olcSubordinate: [TRUE | FALSE | advertise]
1514 Specify that the current backend database is a subordinate of another
1515 backend database. A subordinate  database may have only one suffix. This
1516 option may be used to glue multiple databases into a single namingContext.
1517 If the suffix of the current database is within the namingContext of a
1518 superior database, searches against the superior database will be
1519 propagated to the subordinate as well. All of the databases
1520 associated with a single namingContext should have identical rootdns.
1521 Behavior of other LDAP operations is unaffected by this setting. In
1522 particular, it is not possible to use moddn to move an entry from
1523 one subordinate to another subordinate within the namingContext.
1524
1525 If the optional \fBadvertise\fP flag is supplied, the naming context of
1526 this database is advertised in the root DSE. The default is to hide this
1527 database context, so that only the superior context is visible.
1528
1529 If the slap tools
1530 .BR slapcat (8),
1531 .BR slapadd (8),
1532 or
1533 .BR slapindex (8)
1534 are used on the superior database, any glued subordinates that support
1535 these tools are opened as well.
1536
1537 Databases that are glued together should usually be configured with the
1538 same indices (assuming they support indexing), even for attributes that
1539 only exist in some of these databases. In general, all of the glued
1540 databases should be configured as similarly as possible, since the intent
1541 is to provide the appearance of a single directory.
1542
1543 Note that the subordinate functionality is implemented internally
1544 by the \fIglue\fP overlay and as such its behavior will interact with other
1545 overlays in use. By default, the glue overlay is automatically configured as
1546 the last overlay on the superior database. Its position on the database
1547 can be explicitly configured by setting an \fBoverlay glue\fP directive
1548 at the desired position. This explicit configuration is necessary e.g.
1549 when using the \fIsyncprov\fP overlay, which needs to follow \fIglue\fP
1550 in order to work over all of the glued databases. E.g.
1551 .RS
1552 .nf
1553         dn: olcDatabase={1}bdb,cn=config
1554         olcSuffix: dc=example,dc=com
1555         ...
1556
1557         dn: olcOverlay={0}glue,olcDatabase={1}bdb,cn=config
1558         ...
1559
1560         dn: olcOverlay={1}syncprov,olcDatabase={1}bdb,cn=config
1561         ...
1562 .fi
1563 .RE
1564 See the Overlays section below for more details.
1565 .TP
1566 .B olcSuffix: <dn suffix>
1567 Specify the DN suffix of queries that will be passed to this 
1568 backend database.  Multiple suffix lines can be given and at least one is 
1569 required for each database definition.
1570 If the suffix of one database is "inside" that of another, the database
1571 with the inner suffix must come first in the configuration file.
1572 .HP
1573 .hy 0
1574 .B olcSyncrepl: rid=<replica ID>
1575 .B provider=ldap[s]://<hostname>[:port]
1576 .B searchbase=<base DN>
1577 .B [type=refreshOnly|refreshAndPersist]
1578 .B [interval=dd:hh:mm:ss]
1579 .B [retry=[<retry interval> <# of retries>]+]
1580 .B [filter=<filter str>]
1581 .B [scope=sub|one|base|subord]
1582 .B [attrs=<attr list>]
1583 .B [exattrs=<attr list>]
1584 .B [attrsonly]
1585 .B [sizelimit=<limit>]
1586 .B [timelimit=<limit>]
1587 .B [schemachecking=on|off]
1588 .B [bindmethod=simple|sasl]
1589 .B [binddn=<dn>]
1590 .B [saslmech=<mech>]
1591 .B [authcid=<identity>]
1592 .B [authzid=<identity>]
1593 .B [credentials=<passwd>]
1594 .B [realm=<realm>]
1595 .B [secprops=<properties>]
1596 .B [starttls=yes|critical]
1597 .B [tls_cert=<file>]
1598 .B [tls_key=<file>]
1599 .B [tls_cacert=<file>]
1600 .B [tls_cacertdir=<path>]
1601 .B [tls_reqcert=never|allow|try|demand]
1602 .B [tls_ciphersuite=<ciphers>]
1603 .B [tls_crlcheck=none|peer|all]
1604 .B [logbase=<base DN>]
1605 .B [logfilter=<filter str>]
1606 .B [syncdata=default|accesslog|changelog]
1607 .RS
1608 Specify the current database as a replica which is kept up-to-date with the 
1609 master content by establishing the current
1610 .BR slapd (8)
1611 as a replication consumer site running a
1612 .B syncrepl
1613 replication engine.
1614 The replica content is kept synchronized to the master content using
1615 the LDAP Content Synchronization protocol. Refer to the
1616 "OpenLDAP Administrator's Guide" for detailed information on
1617 setting up a replicated
1618 .B slapd
1619 directory service using the 
1620 .B syncrepl
1621 replication engine.
1622
1623 .B rid
1624 identifies the current
1625 .B syncrepl
1626 directive within the replication consumer site.
1627 It is a non-negative integer having no more than three digits.
1628
1629 .B provider
1630 specifies the replication provider site containing the master content
1631 as an LDAP URI. If <port> is not given, the standard LDAP port number
1632 (389 or 636) is used.
1633
1634 The content of the
1635 .B syncrepl
1636 replica is defined using a search
1637 specification as its result set. The consumer
1638 .B slapd
1639 will send search requests to the provider
1640 .B slapd
1641 according to the search specification. The search specification includes
1642 .B searchbase, scope, filter, attrs, attrsonly, sizelimit,
1643 and
1644 .B timelimit
1645 parameters as in the normal search specification. The
1646 .B exattrs
1647 option may also be used to specify attributes that should be omitted
1648 from incoming entries.
1649 The \fBscope\fP defaults to \fBsub\fP, the \fBfilter\fP defaults to
1650 \fB(objectclass=*)\fP, and there is no default \fBsearchbase\fP. The
1651 \fBattrs\fP list defaults to \fB"*,+"\fP to return all user and operational
1652 attributes, and \fBattrsonly\fP and \fBexattrs\fP are unset by default.
1653 The \fBsizelimit\fP and \fBtimelimit\fP only
1654 accept "unlimited" and positive integers, and both default to "unlimited".
1655 Note, however, that any provider-side limits for the replication identity
1656 will be enforced by the provider regardless of the limits requested
1657 by the LDAP Content Synchronization operation, much like for any other
1658 search operation.
1659
1660 The LDAP Content Synchronization protocol has two operation types.
1661 In the
1662 .B refreshOnly
1663 operation, the next synchronization search operation
1664 is periodically rescheduled at an interval time (specified by 
1665 .B interval
1666 parameter; 1 day by default)
1667 after each synchronization operation finishes.
1668 In the
1669 .B refreshAndPersist
1670 operation, a synchronization search remains persistent in the provider slapd.
1671 Further updates to the master replica will generate
1672 .B searchResultEntry
1673 to the consumer slapd as the search responses to the persistent
1674 synchronization search.
1675
1676 If an error occurs during replication, the consumer will attempt to
1677 reconnect according to the
1678 .B retry
1679 parameter which is a list of the <retry interval> and <# of retries> pairs.
1680 For example, retry="60 10 300 3" lets the consumer retry every 60 seconds
1681 for the first 10 times and then retry every 300 seconds for the next 3
1682 times before stop retrying. The `+' in <# of retries> means indefinite
1683 number of retries until success.
1684
1685 The schema checking can be enforced at the LDAP Sync
1686 consumer site by turning on the
1687 .B schemachecking
1688 parameter. The default is off.
1689
1690 A
1691 .B bindmethod
1692 of 
1693 .B simple
1694 requires the options 
1695 .B binddn
1696 and 
1697 .B credentials
1698 and should only be used when adequate security services
1699 (e.g. TLS or IPSEC) are in place.
1700 A
1701 .B bindmethod
1702 of
1703 .B sasl
1704 requires the option
1705 .B saslmech.
1706 Depending on the mechanism, an authentication identity and/or
1707 credentials can be specified using
1708 .B authcid
1709 and
1710 .B credentials.
1711 The
1712 .B authzid
1713 parameter may be used to specify an authorization identity.
1714 Specific security properties (as with the
1715 .B sasl-secprops
1716 keyword above) for a SASL bind can be set with the
1717 .B secprops
1718 option. A non default SASL realm can be set with the
1719 .B realm 
1720 option.
1721 The provider, other than allow authentication of the syncrepl identity,
1722 should grant that identity appropriate access privileges to the data 
1723 that is being replicated (\fBaccess\fP directive), and appropriate time 
1724 and size limits (\fBlimits\fP directive).
1725
1726
1727 The
1728 .B starttls
1729 parameter specifies use of the StartTLS extended operation
1730 to establish a TLS session before Binding to the provider. If the
1731 .B critical
1732 argument is supplied, the session will be aborted if the StartTLS request
1733 fails. Otherwise the syncrepl session continues without TLS. The
1734 tls_reqcert setting defaults to "demand" and the other TLS settings
1735 default to the same as the main slapd TLS settings.
1736
1737 Rather than replicating whole entries, the consumer can query logs of
1738 data modifications. This mode of operation is referred to as \fIdelta
1739 syncrepl\fP. In addition to the above parameters, the
1740 .B logbase
1741 and
1742 .B logfilter
1743 parameters must be set appropriately for the log that will be used. The
1744 .B syncdata
1745 parameter must be set to either "accesslog" if the log conforms to the
1746 .BR slapo-accesslog (5)
1747 log format, or "changelog" if the log conforms
1748 to the obsolete \fIchangelog\fP format. If the
1749 .B syncdata
1750 parameter is omitted or set to "default" then the log parameters are
1751 ignored.
1752 .RE
1753 .TP
1754 .B olcUpdateDN: <dn>
1755 This option is only applicable in a slave
1756 database.
1757 It specifies the DN permitted to update (subject to access controls)
1758 the replica.  It is only needed in certain push-mode
1759 replication scenarios.  Generally, this DN
1760 .I should not
1761 be the same as the
1762 .B rootdn 
1763 used at the master.
1764 .TP
1765 .B olcUpdateRef: <url>
1766 Specify the referral to pass back when
1767 .BR slapd (8)
1768 is asked to modify a replicated local database.
1769 If multiple values are specified, each url is provided.
1770
1771 .SH DATABASE-SPECIFIC OPTIONS
1772 Each database may allow specific configuration options; they are
1773 documented separately in the backends' manual pages. See the
1774 .BR slapd.backends (5)
1775 manual page for an overview of available backends.
1776 .SH OVERLAYS
1777 An overlay is a piece of
1778 code that intercepts database operations in order to extend or change
1779 them. Overlays are pushed onto
1780 a stack over the database, and so they will execute in the reverse
1781 of the order in which they were configured and the database itself
1782 will receive control last of all.
1783
1784 Overlays must be configured as child entries of a specific database. The
1785 entry's RDN must be of the form
1786 .B olcOverlay={x}<overlaytype>
1787 and the entry must have the olcOverlayConfig objectClass. Normally the
1788 config engine generates the "{x}" index in the RDN automatically, so
1789 it can be omitted when initially loading these entries.
1790
1791 See the
1792 .BR slapd.overlays (5)
1793 manual page for an overview of available overlays.
1794 .SH EXAMPLES
1795 .LP
1796 Here is a short example of a configuration in LDIF suitable for use with
1797 .BR slapadd (8)
1798 :
1799 .LP
1800 .RS
1801 .nf
1802 dn: cn=config
1803 objectClass: olcGlobal
1804 cn: config
1805 olcPidFile: LOCALSTATEDIR/run/slapd.pid
1806 olcAttributeOptions: x-hidden lang-
1807
1808 dn: cn=schema,cn=config
1809 objectClass: olcSchemaConfig
1810 cn: schema
1811
1812 include: SYSCONFDIR/schema/core.ldif
1813
1814 dn: olcDatabase=frontend,cn=config
1815 objectClass: olcDatabaseConfig
1816 objectClass: olcFrontendConfig
1817 olcDatabase: frontend
1818 # Subtypes of "name" (e.g. "cn" and "ou") with the
1819 # option ";x-hidden" can be searched for/compared,
1820 # but are not shown.  See \fBslapd.access\fP(5).
1821 olcAccess: to attrs=name;x-hidden by * =cs
1822 # Protect passwords.  See \fBslapd.access\fP(5).
1823 olcAccess: to attrs=userPassword  by * auth
1824 # Read access to other attributes and entries.
1825 olcAccess: to * by * read
1826
1827 # set a rootpw for the config database so we can bind.
1828 # deny access to everyone else.
1829 dn: olcDatabase=config,cn=config
1830 objectClass: olcDatabaseConfig
1831 olcDatabase: config
1832 olcRootPW: {SSHA}XKYnrjvGT3wZFQrDD5040US592LxsdLy
1833 olcAccess: to * by * none
1834
1835 dn: olcDatabase=bdb,cn=config
1836 objectClass: olcDatabaseConfig
1837 objectClass: olcBdbConfig
1838 olcDatabase: bdb
1839 olcSuffix: "dc=our-domain,dc=com"
1840 # The database directory MUST exist prior to
1841 # running slapd AND should only be accessible
1842 # by the slapd/tools. Mode 0700 recommended.
1843 olcDbDirectory: LOCALSTATEDIR/openldap-data
1844 # Indices to maintain
1845 olcDbIndex:     objectClass  eq
1846 olcDbIndex:     cn,sn,mail   pres,eq,approx,sub
1847
1848 # We serve small clients that do not handle referrals,
1849 # so handle remote lookups on their behalf.
1850 dn: olcDatabase=ldap,cn=config
1851 objectClass: olcDatabaseConfig
1852 objectClass: olcLdapConfig
1853 olcDatabase: ldap
1854 olcSuffix: ""
1855 olcDbUri: ldap://ldap.some-server.com/
1856 .fi
1857 .RE
1858 .LP
1859 Assuming the above data was saved in a file named "config.ldif" and the
1860 ETCDIR/slapd.d directory has been created, this command will initialize
1861 the configuration:
1862 .RS
1863 .nf
1864 slapadd -F ETCDIR/slapd.d -n 0 -l config.ldif
1865 .fi
1866 .RE
1867
1868 .LP
1869 "OpenLDAP Administrator's Guide" contains a longer annotated
1870 example of a slapd configuration.
1871
1872 Alternatively, an existing slapd.conf file can be converted to the new
1873 format using slapd or any of the slap tools:
1874 .RS
1875 .nf
1876 slaptest -f ETCDIR/slapd.conf -F ETCDIR/slapd.d
1877 .fi
1878 .RE
1879
1880 .SH FILES
1881 .TP
1882 ETCDIR/slapd.conf
1883 default slapd configuration file
1884 .TP
1885 ETCDIR/slapd.d
1886 default slapd configuration directory
1887 .SH SEE ALSO
1888 .BR ldap (3),
1889 .BR ldif (5),
1890 .BR slapd.access (5),
1891 .BR slapd.backends (5),
1892 .BR slapd.conf (5),
1893 .BR slapd.overlays (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 .LP
1906 "OpenLDAP Administrator's Guide" (http://www.OpenLDAP.org/doc/admin/)
1907 .SH ACKNOWLEDGEMENTS
1908 .so ../Project