]> git.sur5r.net Git - openldap/blob - doc/man/man5/slapd.conf.5
bb8b45df16896e47dcba919f610c7ba8a527df21
[openldap] / doc / man / man5 / slapd.conf.5
1 .TH SLAPD.CONF 5 "23 August 2000" "OpenLDAP LDVERSION"
2 .\" $OpenLDAP$
3 .\" Copyright 1998-2000 The OpenLDAP Foundation All Rights Reserved.
4 .\" Copying restrictions apply.  See COPYRIGHT/LICENSE.
5 .SH NAME
6 slapd.conf \- configuration file for slapd, the stand-alone LDAP daemon
7 .SH SYNOPSIS
8 ETCDIR/slapd.conf
9 .SH DESCRIPTION
10 The file
11 .B ETCDIR/slapd.conf
12 contains configuration information for the
13 .BR slapd (8)
14 daemon.  This configuration file is also used by the
15 .BR slurpd (8)
16 replication daemon and by the SLAPD tools
17 .BR slapadd (8),
18 .BR slapcat (8),
19 and
20 .BR slapindex (8).
21 .LP
22 The
23 .B slapd.conf
24 file consists of a series of global configuration options that apply to
25 .B slapd
26 as a whole (including all backends), followed by zero or more database
27 backend definitions that contain information specific to a backend
28 instance.
29 .LP
30 The general format of
31 .B slapd.conf
32 is as follows:
33 .LP
34 .nf
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
41     ...
42 .fi
43 .LP
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
47 .B slapd.conf
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.
51 .LP
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
56 backslash character.
57 .LP
58 The specific configuration options available are discussed below in the
59 Global Configuration Options, General Backend Options, LDBM
60 Backend-Specific Options, Shell Backend-Specific Options, and Password
61 Backend-Specific Options sections.  Refer to the "OpenLDAP
62 Administrator's Guide" for more details on the slapd configuration
63 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 <>.
68 .TP
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
72 by <who>).
73 See the "OpenLDAP's Administrator's Guide" for details.
74 .TP
75 .B allow <features>
76 Specify a set of features (separated by white space) to
77 allow (default none).
78 .B tls_2_anon
79 allows Start TLS to force session to anonymous status (see also
80 .B disallow
81 .BR tls_authc ).
82 .TP
83 .B argsfile <filename>
84 The ( absolute ) name of a file that will hold the 
85 .B slapd
86 server's command line options
87 if started without the debugging command line option.
88 .HP
89 .hy 0
90 .B attributetype (\ <oid> [NAME\ <name>] [OBSOLETE]\
91  [DESC\ <description>]\
92  [SUP\ <oid>] [EQUALITY\ <oid>] [ORDERING\ <oid>]\
93  [SUBSTR\ <oid>] [SYNTAX\ <oidlen>] [SINGLE\-VALUE] [COLLECTIVE]\
94  [NO\-USER\-MODIFICATION] [USAGE\ <attributeUsage>]\ )
95 .RS
96 Specify an attribute type using the LDAPv3 syntax defined in RFC 2252.
97 The slapd parser extends the RFC 2252 definition by allowing string
98 forms as well as numeric OIDs to be used for the attribute OID and
99 attribute syntax OID.
100 (See the
101 .B objectidentifier
102 description.) Currently the syntax name parser is case-sensitive.
103 The known syntax names are:
104 .RS
105 .RS
106 .PD 0
107 AttributeTypeDescription Audio Binary BitString Certificate CertificateList
108 CertificatePair DN DeliveryMethod DirectoryString DITContentRuleDescription
109 DITStructureRuleDescription EnhancedGuide FacsimileTelephoneNumber
110 GeneralizedTime Guide IA5String Integer MatchingRuleDescription
111 MatchingRuleUseDescription MailPreference NameAndOptionalUUID
112 NameFormDescription NumericString ObjectClassDescription OID
113 OtherMailbox OctetString PostalAddress ProtocolInformation
114 PresentationAddress PrintableString SupportedAlgorithm TelephoneNumber
115 TeletexTerminalIdentifier TelexNumber UTCTime LDAPSyntaxDescription
116 SubstringAssertion NISnetgrouptriple Bootparameter
117 .PD
118 .RE
119 .RE
120 .RE
121 .TP
122 .B concurrency <integer>
123 Specify a desired level of concurrency.  Provided to the underlying
124 thread system as a hint.  The default is not to provdide any hint.
125 .HP
126 .B defaultaccess { none | auth | compare | search | read | write }
127 .RS
128 Specify the default access level to grant requestors when
129 no access directives were provided for the database.
130 The default behavior is to grant 'read' access.  It is
131 recommended that
132 .B access
133 directives be used instead.
134 .RE
135 .TP
136 .B defaultsearchbase <dn>
137 Specify a default search base to use when client submits a
138 non-base search request with an empty base DN.
139 .TP
140 .B disallow <features>
141 Specify a set of features (separated by white space) to
142 disallow (default none).
143 .B bind_v2
144 disables acceptance of LDAPv2 bind requests.
145 .B bind_anon
146 disables acceptance of anonymous bind requests.
147 .B bind_anon_cred
148 disables anonymous bind creditials are not empty (e.g.
149 when DN is empty).
150 .B bind_anon_dn
151 disables anonymous bind when DN is not empty.
152 .B bind_simple
153 disables simple (bind) authentication.
154 .B bind_krbv4
155 disables Kerberos V4 (bind) authentication.
156 .B tls_authc
157 disables StartTLS if authenticated (see also
158 .B allow
159 .BR tls_2_anon ).
160 .TP
161 .B idletimeout <integer>
162 Specify the number of seconds to wait before forcibly closing
163 an idle client connections.  A idletimeout of 0 disables this
164 feature.  The default is 0.
165 .TP
166 .B include <filename>
167 Read additional configuration information from the given file before
168 continuing with the next line of the current file.
169 .TP
170 .B loglevel <integer>
171 Specify the level at which debugging statements and operation 
172 statistics should be syslogged (currently logged to the
173 .BR syslogd (8) 
174 LOG_LOCAL4 facility).  Log levels are additive, and available levels
175 are:
176 .RS
177 .RS
178 .PD 0
179 .TP
180 .B 1
181 trace function calls
182 .TP
183 .B 2
184 debug packet handling
185 .TP
186 .B 4
187 heavy trace debugging
188 .TP
189 .B 8
190 connection management
191 .TP
192 .B 16
193 print out packets sent and received
194 .TP
195 .B 32
196 search filter processing
197 .TP
198 .B 64
199 configuration file processing
200 .TP
201 .B 128
202 access control list processing
203 .TP
204 .B 256
205 stats log connections/operations/results
206 .TP
207 .B 512
208 stats log entries sent
209 .TP
210 .B 1024
211 print communication with shell backends
212 .TP
213 .B 2048
214 entry parsing
215 .PD
216 .RE
217 .RE
218 .HP
219 .B objectclass ( <oid> [NAME <name>] [DESC <description] [OBSOLETE]\
220  [SUP <oids>] [{ ABSTRACT | STRUCTURAL | AUXILIARY }] [MUST <oids>]\
221  [MAY <oids>] )
222 .RS
223 Specify an objectclass using the LDAPv3 syntax defined in RFC 2252.
224 The slapd parser extends the RFC 2252 definition by allowing string
225 forms as well as numeric OIDs to be used for the object class OID.
226 (See the
227 .B
228 objectidentifier
229 description.)  Object classes are "STRUCTURAL" by default.
230 .RE
231 .TP
232 .B objectidentifier <name> { <oid> | <name>[:<suffix>] }
233 Define a string name that equates to the given OID. The string can be used
234 in place of the numeric OID in objectclass and attribute definitions. The
235 name can also be used with a suffix of the form ":xx" in which case the
236 value "oid.xx" will be used.
237 .TP
238 .B password-hash <hash>
239 The <hash> to use for userPassword generation.  One of
240 .BR {SSHA} ,
241 .BR {SHA} ,
242 .BR {SMD5} ,
243 .BR {MD5} ,
244 .BR {CRYPT} ,
245 .BR {KERBEROS} ,
246 .BR {SASL} ,
247 and
248 .BR {UNIX} .
249 The default is
250 .BR {SSHA} .
251 .TP
252 .B pidfile <filename>
253 The ( absolute ) name of a file that will hold the 
254 .B slapd
255 server's process ID ( see
256 .BR getpid (2)
257 ) if started without the debugging command line option.
258 .TP
259 .B referral <url>
260 Specify the referral to pass back when
261 .BR slapd (8)
262 cannot find a local database to handle a request.
263 If specified multiple times, each url is provided.
264 .TP
265 .B require <conditions>
266 Specify a set of conditions (separated by white space) to
267 require (default none).
268 The directive may be specified globally and/or per-database.
269 .B bind
270 requires bind operation prior to directory operations.
271 .B LDAPv3
272 requires session to be using LDAP version 3.
273 .B authc
274 requires authentication prior to directory operations.
275 .B SASL
276 requires SASL authentication prior to directory operations.
277 .B strong
278 requires strong authentication prior to directory operations.
279 Currently
280 .B SASL
281 and
282 .B strong
283 conditions are currently same.
284 .B none
285 may be used to require no conditions (useful for clearly globally
286 set conditions within a particular database).
287 .TP
288 .B sasl-host <fqdn>
289 Used to specify the fully qualified domain name used for SASL processing.
290 .TP
291 .B sasl-realm <realm>
292 Specify SASL realm.  Default is empty.
293 .TP
294 .B sasl-secprops <properties>
295 Used to specify Cyrus SASL security properties.
296 The
297 .B none
298 flag (without any other properities) causes the flag properites
299 default, "noanonymous,noplain", to be cleared.
300 The
301 .B noplain
302 flag disables mechanisms susceptible to simple passive attacks.
303 The
304 .B noactive
305 flag disables mechanisms susceptible to active attacks.
306 The
307 .B nodict
308 flag disables mechanisms susceptible to passive dictionary attacks.
309 The
310 .B noanonyous
311 flag disables mechanisms which support anonymous login.
312 The
313 .B forwardsec
314 flag require forward secrecy between sessions.
315 The
316 .B passcred
317 require mechanisms which pass client credentials (and allow
318 mechanisms which can pass credentials to do so).
319 The
320 .B minssf=<factor> 
321 property specifies the minimum acceptable
322 .I security strength factor
323 as an integer approximate to effective key length used for
324 encryption.  0 (zero) implies no protection, 1 implies integrity
325 protection only, 56 allows DES or other weak ciphers, 112
326 allows triple DES and other strong ciphers, 128 allows RC4,
327 Blowfish and other modern strong ciphers.  The default is 0.
328 The
329 .B maxssf=<factor> 
330 property specifies the maximum acceptable
331 .I security strength factor
332 as an integer (see minssf description).  The default is INT_MAX.
333 The
334 .B maxbufsize=<size> 
335 property specifies the maximum security layer receive buffer
336 size allowed.  0 disables security layers.  The default is 65536.
337 .TP
338 .B schemacheck { on | off }
339 Turn schema checking on or off. The default is on.
340 .TP
341 .B security <factors>
342 Specify a set of factors (separated by white space) to require.
343 An integer value is associated with each factor and is roughly
344 equivalent of the encryption key length to require.  A value
345 of 112 is equivalent to 3DES, 128 to Blowfish, etc..
346 The directive may be specified globally and/or per-database.
347 .B ssf=<n>
348 specifies the overall security strength factor.
349 .B transport=<n>
350 specifies the transport security strength factor.
351 .B tls=<n>
352 specifies the TLS security strength factor.
353 .B sasl=<n>
354 specifies the SASL security strength factor.
355 .B update_ssf=<n>
356 specifies the overall security strength factor to require for
357 directory updates.
358 .B update_transport=<n>
359 specifies the transport security strength factor to require for
360 directory updates.
361 .B update_tls=<n>
362 specifies the TLS security strength factor to require for
363 directory updates.
364 .B update_sasl=<n>
365 specifies the SASL security strength factor to require for
366 directory updates.
367 Note that the
368 .B transport
369 factor is measure of security provided by the underlying transport,
370 e.g. ldapi:// (and eventually IPSEC).  It is not normally used.
371 .TP
372 .B sizelimit <integer>
373 Specify the maximum number of entries to return from a search operation.
374 The default size limit is 500.
375 .TP
376 .B srvtab <filename>
377 Specify the srvtab file in which the kerberos keys necessary for
378 authenticating clients using kerberos can be found. This option is only
379 meaningful if you are using Kerberos authentication.
380 .TP
381 .B timelimit <integer>
382 Specify the maximum number of seconds (in real time)
383 require forward secrecy between sessions.
384 .TP
385 .B schemacheck { on | off }
386 Turn schema checking on or off. The default is on.
387 .TP
388 .B sizelimit <integer>
389 Specify the maximum number of entries to return from a search operation.
390 The default size limit is 500.
391 .TP
392 .B srvtab <filename>
393 Specify the srvtab file in which the kerberos keys necessary for
394 authenticating clients using kerberos can be found. This option is only
395 meaningful if you are using Kerberos authentication.
396 .TP
397 .B timelimit <integer>
398 Specify the maximum number of seconds (in real time)
399 .B slapd
400 will spend answering a search request.  The default time limit is 3600.
401 .SH TLS OPTIONS
402 If
403 .B slapd
404 is build with support for Transport Layer Security, there are more options
405 you can specify.
406 .TP
407 .B TLSCipherSuite <cipher-suite-spec>
408 Permits configuring what ciphers will be accepted and the preference order.
409 <cipher-suite-spec> should be a cipher specification for OpenSSL.  Example:
410
411 TLSCipherSuite HIGH:MEDIUM:+SSLv2
412
413 To check what ciphers a given spec selects, use:
414
415 openssl ciphers -v <cipher-suite-spec>
416 .TP
417 .B TLSCertificateFile <filename>
418 Specifies the file that contains the
419 .B slapd
420 server certificate.
421 .TP
422 .B TLSCertificateKeyFile <filename>
423 Specifies the file that contains the
424 .B slapd
425 server private key that matches the certificate stored in the
426 .B TLSCertificateFile
427 file.  Currently, the private key must not be protected with a password, so
428 it is of critical importance that it is protected carefully. 
429 .SH GENERAL BACKEND OPTIONS
430 Options in this section only apply to the configuration file section
431 for the backend in which they are defined.  They are supported by every
432 type of backend.
433 .TP
434 .B database <databasetype>
435 Mark the beginning of a new database instance definition. <databasetype>
436 should be one of
437 .B ldbm,
438 .B shell,
439 or
440 .B passwd
441 depending on which backend will serve the database.
442 .TP
443 .B lastmod on | off
444 Controls whether
445 .B slapd
446 will automatically maintain the 
447 modifiersName, modifyTimestamp, creatorsName, and 
448 createTimestamp attributes for entries.  By default, lastmod is on.
449 .TP
450 .B readonly on | off
451 This option puts the database into "read-only" mode.  Any attempts to 
452 modify the database will return an "unwilling to perform" error.  By
453 default, readonly is off.
454 .HP
455 .B replica host=<hostname>[:port] [tls=yes|critical]
456 .B bindmethod=simple|sasl [binddn=<simple DN>] [credentials=<simple password>]
457 .B [saslmech=<SASL mech>] [secopts=<options>] [realm=<realm>]
458 .B [authcId=<authentication ID>] [authcId=<authentication ID>]
459 .RS
460 Specify a replication site for this database.  Refer to the "OpenLDAP 
461 Administrator's Guide" for detailed information on setting up a replicated
462 .B slapd
463 directory service. A
464 .B bindmethod
465 of
466 .B simple
467 requires the options
468 .B binddn 
469 and
470 .B credentials  
471 and should only be used when adequate security services 
472 (e.g TLS or IPSEC) are in place. A
473 .B bindmethod 
474 of
475 .B sasl 
476 requires the option
477 .B saslmech. 
478 If the 
479 .B mechanism
480 will use Kerberos, a kerberos instance should be given in 
481 .B authcId.
482 .RE
483 .TP
484 .B replogfile <filename>
485 Specify the name of the replication log file to log changes to.  
486 The replication log is typically written by
487 .BR slapd (8)
488 and read by
489 .BR slurpd (8).
490 See
491 .BR slapd.replog (5)
492 for more information.
493 .TP
494 .B rootdn <dn>
495 Specify the distinguished name that is not subject to access control 
496 or administrative limit restrictions for operations on this database.
497 This DN may or may not be associated with an entry.  An empty root
498 DN (the default) specifies no root access is to be granted.  It is
499 recommended that the rootdn only be specified when needed (such as
500 when initially populating a database).  If the rootdn is within
501 a namingContext (suffix) of the database, a simple bind password
502 may also be provided using the
503 .B rootpw
504 directive.
505 .TP
506 .B rootpw <password>
507 Specify a password (or hash of the password) for the rootdn.  If
508 the rootdn is not within the namingContext of the database, the
509 provided password is ignored.
510 This option accepts all RFC 2307 userPassword formats known to
511 the server (see 
512 .B password-hash
513 desription) as well as cleartext.
514 .BR slappasswd (8) 
515 may be used to generate a hash of a password.  Cleartext
516 and \fB{CRYPT}\fP passwords are not recommended.  If empty
517 (the default), authentication of the root DN is by other means
518 (e.g. SASL).  Use of SASL is encouraged.
519 .TP
520 .B suffix <dn suffix>
521 Specify the DN suffix of queries that will be passed to this 
522 backend database.  Multiple suffix lines can be given and at least one is 
523 required for each database definition.
524 .TP
525 .B updatedn <dn>
526 This option is only applicable in a slave
527 .B slapd.
528 It specifies the DN allowed to make changes to the replica (typically,
529 this is the DN
530 .BR slurpd (8)
531 binds as when making changes to the replica).
532 .TP
533 .B updateref <url>
534 Specify the referral to pass back when
535 .BR slapd (8)
536 is asked to modify a replicated local database.
537 If specified multiple times, each url is provided.
538 .SH LDBM BACKEND-SPECIFIC OPTIONS
539 Options in this category only apply to the LDBM backend database. That is,
540 they must follow a "database ldbm" line and come before any subsequent
541 "database" lines.  The LDBM backend is a high-performance database that
542 makes extensive use of indexing and caching to speed data access. 
543 .TP
544 .B cachesize <integer>
545 Specify the size in entries of the in-memory cache maintained 
546 by the LDBM backend database instance.  The default is 1000 entries.
547 .TP
548 .B dbcachesize <integer>
549 Specify the size in bytes of the in-memory cache associated 
550 with each open index file. If not supported by the underlying database 
551 method, this option is ignored without comment.  The default is 100000 bytes.
552 .TP
553 .B dbnolocking
554 Specify that no database locking should be performed.  
555 Enabling this option may improve performance at the expense of data security.
556 .B dbnosync
557 Specify that on-disk database contents should not be immediately
558 synchronized with in memory changes.  Enabling this option may improve
559 performance at the expense of data security.
560 .TP
561 .B directory <directory>
562 Specify the directory where the LDBM files containing this database and
563 associated indexes live.  A separate directory must be specified for
564 each database.  The default is
565 .BR LOCALSTATEDIR/openldap-ldbm .
566 .TP
567 .B
568 index {<attrlist>|default} [pres,eq,approx,sub,<special>]
569 Specify the indexes to maintain for the given attribute. If only 
570 an <attr> is given, the indices specified for \fBdefault\fR
571 are maintained.  A number of special index parameters may be
572 specified.
573 The index type
574 .B sub
575 can be decomposed into
576 .BR subinitial ,
577 .BR subany ,\ and
578 .B subfinal
579 indices.
580 The special type
581 .B lang
582 may be specified to allow use of this index by language subtypes.
583 The special type
584 .B autolang
585 may be specified to automatically maintain separate indices for each
586 language subtypes.
587 The special type
588 .B subtypes
589 may be specified to allow use of this index by named subtypes.
590 The special type
591 .B autosubtypes
592 may be specified to automatically maintain separate indices for each
593 other subtypes.
594 .TP
595 .B mode <integer>
596 Specify the file protection mode that newly created database 
597 index files should have.  The default is 0600.
598 .SH SHELL BACKEND-SPECIFIC OPTIONS
599 Options in this category only apply to the SHELL backend database. That is,
600 they must follow a "database shell" line and come before any subsequent
601 "database" lines.  The Shell backend executes external programs to
602 implement operations, and is designed to make it easy to tie an existing
603 database to the
604 .B slapd
605 front-end.
606 .TP
607 .B bind <pathname>
608 .TP
609 .B unbind <pathname>
610 .TP
611 .B search <pathname>
612 .TP
613 .B compare <pathname>
614 .TP
615 .B modify <pathname>
616 .TP
617 .B modrdn <pathname>
618 .TP
619 .B add <pathname>
620 .TP
621 .B delete <pathname>
622 .TP
623 .B abandon <pathname>
624 These options specify the pathname of the command to execute in response 
625 to the given LDAP operation.
626 .LP
627 Note that you need only supply configuration lines for those commands you
628 want the backend to handle. Operations for which a command is not
629 supplied will be refused with an "unwilling to perform" error.
630 .SH PASSWORD BACKEND-SPECIFIC OPTIONS
631 Options in this category only apply to the PASSWD backend database.
632 That is, they must follow a "database passwd" line and come before any
633 subsequent "database" lines.  The PASSWD database serves up the user
634 account information listed in the system
635 .BR passwd (5)
636 file.
637 .TP
638 .B file <filename>
639 Specifies an alternate passwd file to use.  The default is
640 .B /etc/passwd.
641 .SH EXAMPLE
642 "OpenLDAP Administrator's Guide" contains an annotated
643 example of a configuration file.
644 .SH FILES
645 ETCDIR/slapd.conf
646 .SH SEE ALSO
647 .BR ldap (3),
648 .BR slapd.replog (5),
649 .BR locale (5),
650 .BR passwd (5),
651 .BR slapd (8),
652 .BR slapadd (8),
653 .BR slapcat (8),
654 .BR slapindex (8),
655 .BR slappassword (8),
656 .BR slurpd (8),
657 .LP
658 "OpenLDAP Administrator's Guide" (http://www.OpenLDAP.org/doc/admin/)
659 .SH ACKNOWLEDGEMENTS
660 .B      OpenLDAP
661 is developed and maintained by The OpenLDAP Project (http://www.openldap.org/).
662 .B      OpenLDAP
663 is derived from University of Michigan LDAP 3.3 Release.