1 .TH SLAPD.CONF 5 "2 May 2002" "OpenLDAP LDVERSION"
2 .\" Copyright 1998-2002 The OpenLDAP Foundation All Rights Reserved.
3 .\" Copying restrictions apply. See COPYRIGHT/LICENSE.
6 slapd.conf \- configuration file for slapd, the stand-alone LDAP daemon
12 contains configuration information for the
14 daemon. This configuration file is also used by the
16 replication daemon and by the SLAPD tools
24 file consists of a series of global configuration options that apply to
26 as a whole (including all backends), followed by zero or more database
27 backend definitions that contain information specific to a backend
35 # comment - these options apply to every database
36 <global configuration options>
37 # first database definition & configuration options
38 database <backend 1 type>
39 <configuration options specific to backend 1>
40 # subsequent database definitions & configuration options
44 As many backend-specific sections as desired may be included. Global
45 options can be overridden in a backend (for options that appear more
46 than once, the last appearance in the
48 file is used). Blank lines and comment lines beginning with a `#'
49 character are ignored. If a line begins with white space, it is
50 considered a continuation of the previous line.
52 Arguments on configuration lines are separated by white space. If an
53 argument contains white space, the argument should be enclosed in
54 double quotes. If an argument contains a double quote (`"') or a
55 backslash character (`\\'), the character should be preceded by a
58 The specific configuration options available are discussed below in the
59 Global Configuration Options, General Backend Options, and General Database
60 Options. Backend-specific options are discussed in the
62 manual pages. Refer to the "OpenLDAP Administrator's Guide" for more
63 details on the slapd configuration file.
64 .SH GLOBAL CONFIGURATION OPTIONS
65 Options described in this section apply to all backends, unless specifically
66 overridden in a backend definition. Arguments that should be replaced by
67 actual text are shown in brackets <>.
69 .B access to <what> "[ by <who> <access> <control> ]+"
70 Grant access (specified by <access>) to a set of entries and/or
71 attributes (specified by <what>) by one or more requestors (specified
75 and the "OpenLDAP's Administrator's Guide" for details.
78 Specify a set of features (separated by white space) to
81 allows acceptance of LDAPv2 bind requests.
83 allows anonymous bind when credentials are not empty (e.g.
86 allows unauthenticated (anonymous) bind when DN is not empty.
88 .B argsfile <filename>
89 The ( absolute ) name of a file that will hold the
91 server's command line options
92 if started without the debugging command line option.
95 .B attributetype "(\ <oid> [NAME\ <name>] [OBSOLETE]\
96 [DESC\ <description>]\
97 [SUP\ <oid>] [EQUALITY\ <oid>] [ORDERING\ <oid>]\
98 [SUBSTR\ <oid>] [SYNTAX\ <oidlen>] [SINGLE\-VALUE] [COLLECTIVE]\
99 [NO\-USER\-MODIFICATION] [USAGE\ <attributeUsage>]\ )"
101 Specify an attribute type using the LDAPv3 syntax defined in RFC 2252.
102 The slapd parser extends the RFC 2252 definition by allowing string
103 forms as well as numeric OIDs to be used for the attribute OID and
104 attribute syntax OID.
107 description.) Currently the syntax name parser is case-sensitive.
108 The known syntax names are:
112 AttributeTypeDescription Audio Binary BitString Certificate CertificateList
113 CertificatePair DN DeliveryMethod DirectoryString DITContentRuleDescription
114 DITStructureRuleDescription EnhancedGuide FacsimileTelephoneNumber
115 GeneralizedTime Guide IA5String Integer MatchingRuleDescription
116 MatchingRuleUseDescription MailPreference NameAndOptionalUUID
117 NameFormDescription NumericString ObjectClassDescription OID
118 OtherMailbox OctetString PostalAddress ProtocolInformation
119 PresentationAddress PrintableString SupportedAlgorithm TelephoneNumber
120 TeletexTerminalIdentifier TelexNumber UTCTime LDAPSyntaxDescription
121 SubstringAssertion NISnetgrouptriple Bootparameter
127 .B concurrency <integer>
128 Specify a desired level of concurrency. Provided to the underlying
129 thread system as a hint. The default is not to provide any hint.
131 .\".B debug <subsys> <level>
132 .\"Specify a logging level for a particular subsystem. The subsystems include
134 .\"a global level for all subsystems,
138 .\"the backend databases,
140 .\"the entry cache manager,
142 .\"the config file reader,
144 .\"the connection manager,
146 .\"the Cyrus SASL library interface,
148 .\"the search filter processor,
150 .\"the DN normalization library,
152 .\"the database indexer,
154 .\"the ASN.1 BER library,
156 .\"the dynamic module loader,
158 .\"the LDAP operation processors,
160 .\"the SASL authentication subsystem,
162 .\"the schema processor, and
164 .\"the TLS library interface. This is not an exhaustive list; there are many
165 .\"other subsystems and more are added over time.
167 .\"The levels are, in order of decreasing priority:
168 .\".B emergency, alert, critical, error, warning, notice, information, entry,
169 .\".B args, results, detail1, detail2
170 .\"An integer may be used instead, with 0 corresponding to
176 .\"level logs function entry points,
178 .\"adds function call parameters, and
180 .\"adds the function results to the logs.
185 .\"levels add even more low level detail from individual functions.
187 .B defaultsearchbase <dn>
188 Specify a default search base to use when client submits a
189 non-base search request with an empty base DN.
191 .B disallow <features>
192 Specify a set of features (separated by white space) to
193 disallow (default none).
195 disables acceptance of anonymous bind requests.
197 disables simple (bind) authentication.
199 disables Kerberos V4 (bind) authentication.
201 disables Start TLS from forcing session to anonymous status (see also
204 disables StartTLS if authenticated (see also
207 .B idletimeout <integer>
208 Specify the number of seconds to wait before forcibly closing
209 an idle client connection. A idletimeout of 0 disables this
210 feature. The default is 0.
212 .B include <filename>
213 Read additional configuration information from the given file before
214 continuing with the next line of the current file.
216 .B limits <who> <limit> [<limit> [...]]
217 Specify time and size limits based on who initiated an operation.
224 anonymous | users | [dn[.<style>]=]<pattern>
230 <style> ::= exact | base | one | subtree | children | regex | anonymous
234 is hit when a search is performed without prior binding;
236 is hit when a search is performed by a successfully bound user;
239 dn pattern is assumed unless otherwise specified by qualifying
240 the (optional) key string
246 (which are synonims), to require an exact match; with
248 to require exactly one level of depth match; with
250 to allow any level of depth match, including the exact match; with
252 to allow any level of depth match, not including the exact match;
254 explicitly requires the (default) match based on regular expression
255 pattern, as detailed in
259 matches unbound operations; the
262 The same behavior is obtained by using the
268 The currently supported limits are
273 The syntax for time limits is
274 .BR time[.{soft|hard}]=<integer> ,
277 is the number of seconds slapd will spend answering a search request.
278 If no time limit is explicitly requested by the client, the
280 limit is used; if the requested time limit exceedes the
282 limit, an "Unwilling to perform" is returned.
285 limit is set to 0 or to the keyword "soft", the soft limit is used
286 in either case; if it is set to -1 or to the keyword "none",
287 no hard limit is enforced.
288 Explicit requests for time limits smaller or equal to the
291 If no flag is set, the value is assigned to the
295 limit is set to zero, to preserve the original behavior.
297 The syntax for size limits is
298 .BR size[.{soft|hard|unchecked}]=<integer> ,
301 is the maximum number of entries slapd will return answering a search
303 If no size limit is explicitly requested by the client, the
305 limit is used; if the requested size limit exceedes the
307 limit, an "Unwilling to perform" is returned.
310 limit is set to 0 or to the keyword "soft", the soft limit is used
311 in either case; if it is set to -1 or to the keyword "none",
312 no hard limit is enforced.
313 Explicit requests for size limits smaller or equal to the
318 flag sets a limit on the number of candidates a search request is allowed
320 If the selected candidates exceed the
322 limit, the search will abort with "Unwilling to perform".
323 If it is set to -1 or to the keyword "none", no limit is applied (the default).
324 If no flag is set, the value is assigned to the
328 limit is set to zero, to preserve the original behavior.
330 In case of no match, the global limits are used.
331 The default values are the same of
339 .\".B logfile <filename>
340 .\"Specify a file for recording debug log messages. By default these messages
341 .\"only go to stderr and are not recorded anywhere else. Specifying a logfile
342 .\"copies messages to both stderr and the logfile.
344 .B loglevel <integer>
345 Specify the level at which debugging statements and operation
346 statistics should be syslogged (currently logged to the
348 LOG_LOCAL4 facility). Log levels are additive, and available levels
358 debug packet handling
361 heavy trace debugging
364 connection management
367 print out packets sent and received
370 search filter processing
373 configuration file processing
376 access control list processing
379 stats log connections/operations/results
382 stats log entries sent
385 print communication with shell backends
393 .B moduleload <filename>
394 Specify the name of a dynamically loadable module to load. The filename
395 may be an absolute path name or a simple filename. Non-absolute names
396 are searched for in the directories specified by the
398 option. This option and the
400 option are only usable if slapd was compiled with --enable-modules.
402 .B modulepath <pathspec>
403 Specify a list of directories to search for loadable modules. Typically
404 the path is colon-separated but this depends on the operating system.
406 .B objectclass "( <oid> [NAME <name>] [DESC <description] [OBSOLETE]\
407 [SUP <oids>] [{ ABSTRACT | STRUCTURAL | AUXILIARY }] [MUST <oids>]\
410 Specify an objectclass using the LDAPv3 syntax defined in RFC 2252.
411 The slapd parser extends the RFC 2252 definition by allowing string
412 forms as well as numeric OIDs to be used for the object class OID.
416 description.) Object classes are "STRUCTURAL" by default.
419 .B objectidentifier <name> "{ <oid> | <name>[:<suffix>] }"
420 Define a string name that equates to the given OID. The string can be used
421 in place of the numeric OID in objectclass and attribute definitions. The
422 name can also be used with a suffix of the form ":xx" in which case the
423 value "oid.xx" will be used.
425 .B password-hash <hash>
426 This option sets the hash to be used in generation of user
427 passwords, stored in userPassword, during processing of
428 LDAP Password Modify Extended Operations (RFC 3052).
429 The <hash> must be one of
439 Note that this option does not alter the normal user applications
440 handling of userPassword during LDAP Add, Modify, or other LDAP operations.
442 .B password\-crypt\-salt\-format <format>
443 Specify the format of the salt passed to
445 when generating {CRYPT} passwords (see
447 during processing of LDAP Password Modify Extended Operations (RFC 3062).
449 This string needs to be in
451 format and may include one (and only one) %s conversion.
452 This conversion will be substituted with a string random
453 characters from [A\-Za\-z0\-9./]. For example, "%.2s"
454 provides a two character salt and "$1$%.8s" tells some
455 versions of crypt(3) to use an MD5 algorithm and provides
456 8 random characters of salt. The default is "%s", which
457 provides 31 characters of salt.
459 .B pidfile <filename>
460 The ( absolute ) name of a file that will hold the
462 server's process ID ( see
464 ) if started without the debugging command line option.
467 Specify the referral to pass back when
469 cannot find a local database to handle a request.
470 If specified multiple times, each url is provided.
472 .B require <conditions>
473 Specify a set of conditions (separated by white space) to
474 require (default none).
475 The directive may be specified globally and/or per-database.
477 requires bind operation prior to directory operations.
479 requires session to be using LDAP version 3.
481 requires authentication prior to directory operations.
483 requires SASL authentication prior to directory operations.
485 requires strong authentication prior to directory operations.
490 conditions are currently same.
492 may be used to require no conditions (useful for clearly globally
493 set conditions within a particular database).
495 .B reverse-lookup on | off
496 Enable/disable client name reverse lookup (default is
498 if compiled with --enable-rlookups).
501 Specify the name of an LDIF(5) file containing user defined attributes
502 for the root DSE. These attributes are returned in addition to the
503 attributes normally produced by slapd.
506 Used to specify the fully qualified domain name used for SASL processing.
508 .B sasl-realm <realm>
509 Specify SASL realm. Default is empty.
511 .B sasl-regexp <match> <replace>
512 Used by the SASL authorization mechanism to convert a SASL authenticated
513 username to an LDAP DN. When an authorization request is received, the SASL
517 are taken, when available, and combined into a SASL name of the
522 .B uid=<username>[,cn=<realm>],cn=<mechanism>,cn=auth
525 This SASL name is then compared against the
527 regular expression, and if the match is successful, the SASL name is
530 string. If there are wildcard strings in the
532 regular expression that are enclosed in parenthesis, e.g.
540 then the portion of the SASL name that matched the wildcard will be stored
541 in the numbered placeholder variable $1. If there are other wildcard strings
542 in parenthesis, the matching strings will be in $2, $3, etc. up to $9. The
543 placeholders can then be used in the
549 .B cn=$1,ou=Accounts,dc=$2,dc=$4.
553 The replaced SASL name can be either a DN or an LDAP URI. If the latter, the slapd
554 server will use the URI to search its own database, and if the search returns
555 exactly one entry, the SASL name is replaced by the DN of that entry.
558 options can be given in the configuration file to allow for multiple matching
559 and replacement patterns. The matching patterns are checked in the order they
560 appear in the file, stopping at the first successful match.
563 .\"Because the plus sign + is a character recognized by the regular expression engine,
564 .\"and it will appear in SASL names that include a REALM, be careful to escape the
565 .\"plus sign with a backslash \\+ to remove the character's special meaning.
568 .B sasl-secprops <properties>
569 Used to specify Cyrus SASL security properties.
572 flag (without any other properities) causes the flag properites
573 default, "noanonymous,noplain", to be cleared.
576 flag disables mechanisms susceptible to simple passive attacks.
579 flag disables mechanisms susceptible to active attacks.
582 flag disables mechanisms susceptible to passive dictionary attacks.
585 flag disables mechanisms which support anonymous login.
588 flag require forward secrecy between sessions.
591 require mechanisms which pass client credentials (and allow
592 mechanisms which can pass credentials to do so).
595 property specifies the minimum acceptable
596 .I security strength factor
597 as an integer approximate to effective key length used for
598 encryption. 0 (zero) implies no protection, 1 implies integrity
599 protection only, 56 allows DES or other weak ciphers, 112
600 allows triple DES and other strong ciphers, 128 allows RC4,
601 Blowfish and other modern strong ciphers. The default is 0.
604 property specifies the maximum acceptable
605 .I security strength factor
606 as an integer (see minssf description). The default is INT_MAX.
609 property specifies the maximum security layer receive buffer
610 size allowed. 0 disables security layers. The default is 65536.
612 .B security <factors>
613 Specify a set of factors (separated by white space) to require.
614 An integer value is associated with each factor and is roughly
615 equivalent of the encryption key length to require. A value
616 of 112 is equivalent to 3DES, 128 to Blowfish, etc..
617 The directive may be specified globally and/or per-database.
619 specifies the overall security strength factor.
621 specifies the transport security strength factor.
623 specifies the TLS security strength factor.
625 specifies the SASL security strength factor.
627 specifies the overall security strength factor to require for
629 .B update_transport=<n>
630 specifies the transport security strength factor to require for
633 specifies the TLS security strength factor to require for
636 specifies the SASL security strength factor to require for
640 factor is measure of security provided by the underlying transport,
641 e.g. ldapi:// (and eventually IPSEC). It is not normally used.
643 .B sizelimit <integer>
645 .B sizelimit size[.{soft|hard|unchecked}]=<integer> [...]
646 Specify the maximum number of entries to return from a search operation.
647 The default size limit is 500.
648 The second format allows a fine grain setting of the size limits.
649 Extra args can be added on the same line.
652 for an explanation of the different flags.
654 .B sockbuf_max_incoming <integer>
655 Specify the maximum incoming LDAP PDU size for anonymous sessions.
656 The default is 262143.
658 .B sockbuf_max_incoming_auth <integer>
659 Specify the maximum incoming LDAP PDU size for authenticated sessions.
660 The default is 4194303.
663 Specify the srvtab file in which the kerberos keys necessary for
664 authenticating clients using kerberos can be found. This option is only
665 meaningful if you are using Kerberos authentication.
668 Specify the maximum size of the primary thread pool.
671 .B timelimit <integer>
673 .B timelimit time[.{soft|hard}]=<integer> [...]
674 Specify the maximum number of seconds (in real time)
676 will spend answering a search request. The default time limit is 3600.
677 The second format allows a fine grain setting of the time limits.
678 Extra args can be added on the same line.
681 for an explanation of the different flags.
683 .B ucdata-path <path>
684 Specify the path to the directory containing the Unicode character
685 tables. The default path is LOCALSTATEDIR/ucdata.
689 is built with support for Transport Layer Security, there are more options
692 .B TLSCipherSuite <cipher-suite-spec>
693 Permits configuring what ciphers will be accepted and the preference order.
694 <cipher-suite-spec> should be a cipher specification for OpenSSL. Example:
696 TLSCipherSuite HIGH:MEDIUM:+SSLv2
698 To check what ciphers a given spec selects, use:
700 openssl ciphers -v <cipher-suite-spec>
702 .B TLSCACertificateFile <filename>
703 Specifies the file that contains certificates for all of the Certificate
708 .B TLSCACertificatePath <path>
709 Specifies the path of a directory that contains Certificate Authority
710 certificates in separate individual files. Usually only one of this
711 or the TLSCACertificateFile is used.
713 .B TLSCertificateFile <filename>
714 Specifies the file that contains the
718 .B TLSCertificateKeyFile <filename>
719 Specifies the file that contains the
721 server private key that matches the certificate stored in the
722 .B TLSCertificateFile
723 file. Currently, the private key must not be protected with a password, so
724 it is of critical importance that it is protected carefully.
726 .B TLSRandFile <filename>
727 Specifies the file to obtain random bits from when /dev/[u]random
728 is not available. Generally set to the name of the EGD/PRNGD socket.
729 The environment variable RANDFILE can also be used to specify the filename.
731 .B TLSVerifyClient <level>
732 Specifies what checks to perform on client certificates in an
733 incoming TLS session, if any.
736 can be specified as one of the following keywords:
742 will not ask the client for a certificate.
745 The client certificate is requested. If no certificate is provided,
746 the session proceeds normally. If a bad certificate is provided,
747 it will be ignored and the session proceeds normally.
750 The client certificate is requested. If no certificate is provided,
751 the session proceeds normally. If a bad certificate is provided,
752 the session is immediately terminated.
754 .B demand | hard | true
755 These keywords are all equivalent, for compatibility reasons.
756 The client certificate is requested. If no certificate is provided,
757 or a bad certificate is provided, the session is immediately terminated.
759 Note that a valid client certificate is required in order to use the
760 SASL EXTERNAL authentication mechanism with a TLS session. As such,
763 setting must be chosen to enable SASL EXTERNAL authentication.
765 .SH GENERAL BACKEND OPTIONS
766 Options in this section only apply to the configuration file section
767 for the specified backend. They are supported by every
770 .B backend <databasetype>
771 Mark the beginning of a backend definition. <databasetype>
786 depending on which backend will serve the database.
788 .SH GENERAL DATABASE OPTIONS
789 Options in this section only apply to the configuration file section
790 for the database in which they are defined. They are supported by every
791 type of backend. Note that the
795 option are mandatory for each database.
797 .B database <databasetype>
798 Mark the beginning of a new database instance definition. <databasetype>
813 depending on which backend will serve the database.
818 will automatically maintain the
819 modifiersName, modifyTimestamp, creatorsName, and
820 createTimestamp attributes for entries. By default, lastmod is on.
822 .B maxderefdepth <depth>
823 Specifies the maximum number of aliases to dereference when trying to
824 resolve an entry, used to avoid inifinite alias loops. The default is 1.
827 This option puts the database into "read-only" mode. Any attempts to
828 modify the database will return an "unwilling to perform" error. By
829 default, readonly is off.
831 .B replica host=<hostname>[:port] [tls=yes|critical]
832 .B [suffix=<suffix> [...]]
833 .B bindmethod=simple|sasl [binddn=<simple DN>] [credentials=<simple password>]
834 .B [saslmech=<SASL mech>] [secopts=<options>] [realm=<realm>]
835 .B [authcId=<authentication ID>] [authcId=<authentication ID>]
836 .B [attr[!]=<attr list>]
838 Specify a replication site for this database. Refer to the "OpenLDAP
839 Administrator's Guide" for detailed information on setting up a replicated
841 directory service. Zero or more
843 instances can be used to select the subtrees that will be replicated
844 (defaults to all the database). A
852 and should only be used when adequate security services
853 (e.g TLS or IPSEC) are in place. A
861 will use Kerberos, a kerberos instance should be given in
865 can be given after the
867 keyword to allow the selective replication of the listed attributes only;
870 mark is used, the list is considered exclusive, i.e. the listed attributes
872 If an objectClass is listed, all the related attributes
873 are (are not) replicated.
876 .B replogfile <filename>
877 Specify the name of the replication log file to log changes to.
878 The replication log is typically written by
884 for more information. The specified file should be located
885 in a directory with limited read/write/execute access as the replication
886 logs may contain sensitive information.
889 Specify the distinguished name that is not subject to access control
890 or administrative limit restrictions for operations on this database.
891 This DN may or may not be associated with an entry. An empty root
892 DN (the default) specifies no root access is to be granted. It is
893 recommended that the rootdn only be specified when needed (such as
894 when initially populating a database). If the rootdn is within
895 a namingContext (suffix) of the database, a simple bind password
896 may also be provided using the
901 Specify a password (or hash of the password) for the rootdn. If
902 the rootdn is not within the namingContext of the database, the
903 provided password is ignored.
904 This option accepts all RFC 2307 userPassword formats known to
907 desription) as well as cleartext.
909 may be used to generate a hash of a password. Cleartext
910 and \fB{CRYPT}\fP passwords are not recommended. If empty
911 (the default), authentication of the root DN is by other means
912 (e.g. SASL). Use of SASL is encouraged.
914 .B suffix <dn suffix>
915 Specify the DN suffix of queries that will be passed to this
916 backend database. Multiple suffix lines can be given and at least one is
917 required for each database definition.
918 If the suffix of one database is "inside" that of another, the database
919 with the inner suffix must come first in the configuration file.
921 .B suffixalias <alias> <aliased suffix>
922 Specify an alternate suffix that may be used to reference an already defined
923 database suffix. Operations specifying DNs residing under the alias
924 will execute as if they had specified the aliased suffix.
927 Specify that the current backend database is a subordinate of another
928 backend database. A subordinate database may have only one suffix. This
929 option may be used to glue multiple databases into a single namingContext.
930 If the suffix of the current database is within the namingContext of a
931 superior database, searches against the superior database will be
932 propagated to the subordinate as well. All of the databases
933 associated with a single namingContext should have identical rootdns.
934 Behavior of other LDAP operations is unaffected by this setting. In
935 particular, it is not possible to use moddn to move an entry from
936 one subordinate to another subordinate within the namingContext.
939 This option is only applicable in a slave
941 It specifies the DN allowed to make changes to the replica (typically,
944 binds as when making changes to the replica).
947 Specify the referral to pass back when
949 is asked to modify a replicated local database.
950 If specified multiple times, each url is provided.
951 .SH DATABASE-SPECIFIC OPTIONS
952 Each database may allow specific configuration options; they are
953 documented separately in the
954 .BR slapd-<backend> (5)
958 Here is a short example of a configuration file:
962 include SYSCONFDIR/schema/core.schema
963 pidfile LOCALSTATEDIR/slapd.pid
966 suffix "dc=our-domain,dc=com"
967 # The database directory MUST exist prior to
968 # running slapd AND should only be accessible
969 # by the slapd/tools. Mode 700 recommended.
970 directory LOCALSTATEDIR/openldap-data
971 # Indices to maintain
973 index cn,sn,mail pres,eq,approx,sub
975 # We serve small clients that do not handle referrals,
976 # so handle remote lookups on their behalf.
979 uri ldap://ldap.some-server.com/
984 "OpenLDAP Administrator's Guide" contains a longer annotated
985 example of a configuration file.
986 The original ETCDIR/slapd.conf is another example.
990 default slapd configuration file
994 .BR slapd-dnssrv (5),
999 .BR slapd-passwd (5),
1001 .BR slapd-shell (5),
1004 .BR slapd.replog (5),
1005 .BR slapd.access (5),
1011 .BR slappassword (8),
1014 "OpenLDAP Administrator's Guide" (http://www.OpenLDAP.org/doc/admin/)
1015 .SH ACKNOWLEDGEMENTS
1017 is developed and maintained by The OpenLDAP Project (http://www.openldap.org/).
1019 is derived from University of Michigan LDAP 3.3 Release.