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