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