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