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