slapd.conf.5 67.2 KB
Newer Older
1
.TH SLAPD.CONF 5 "RELEASEDATE" "OpenLDAP LDVERSION"
Quanah Gibson-Mount's avatar
Quanah Gibson-Mount committed
2
.\" Copyright 1998-2021 The OpenLDAP Foundation All Rights Reserved.
Kurt Zeilenga's avatar
Kurt Zeilenga committed
3
.\" Copying restrictions apply.  See COPYRIGHT/LICENSE.
4
.\" $OpenLDAP$
Kurt Zeilenga's avatar
Kurt Zeilenga committed
5
6
7
8
9
10
11
12
13
.SH NAME
slapd.conf \- configuration file for slapd, the stand-alone LDAP daemon
.SH SYNOPSIS
ETCDIR/slapd.conf
.SH DESCRIPTION
The file
.B ETCDIR/slapd.conf
contains configuration information for the
.BR slapd (8)
Howard Chu's avatar
Howard Chu committed
14
daemon.  This configuration file is also used by the SLAPD tools
Pierangelo Masarati's avatar
Pierangelo Masarati committed
15
.BR slapacl (8),
16
.BR slapadd (8),
Pierangelo Masarati's avatar
Pierangelo Masarati committed
17
.BR slapauth (8),
18
.BR slapcat (8),
Pierangelo Masarati's avatar
Pierangelo Masarati committed
19
20
.BR slapdn (8),
.BR slapindex (8),
21
.BR slapmodify (8),
Kurt Zeilenga's avatar
Kurt Zeilenga committed
22
and
Pierangelo Masarati's avatar
Pierangelo Masarati committed
23
.BR slaptest (8).
Kurt Zeilenga's avatar
Kurt Zeilenga committed
24
25
26
27
28
29
30
31
.LP
The
.B slapd.conf
file consists of a series of global configuration options that apply to
.B slapd
as a whole (including all backends), followed by zero or more database
backend definitions that contain information specific to a backend
instance.
32
33
The configuration options are case-insensitive;
their value, on a case by case basis, may be case-sensitive.
Kurt Zeilenga's avatar
Kurt Zeilenga committed
34
35
36
37
38
39
40
41
42
.LP
The general format of
.B slapd.conf
is as follows:
.LP
.nf
    # comment - these options apply to every database
    <global configuration options>
    # first database definition & configuration options
43
    database <backend 1 type>
Kurt Zeilenga's avatar
Kurt Zeilenga committed
44
45
46
47
48
49
50
51
52
    <configuration options specific to backend 1>
    # subsequent database definitions & configuration options
    ...
.fi
.LP
As many backend-specific sections as desired may be included.  Global
options can be overridden in a backend (for options that appear more
than once, the last appearance in the
.B slapd.conf
53
54
55
file is used).
.LP
If a line begins with white space, it is considered a continuation
Kurt Zeilenga's avatar
Kurt Zeilenga committed
56
57
58
59
of the previous line.  No physical line should be over 2000 bytes
long.
.LP
Blank lines and comment lines beginning with
60
61
a `#' character are ignored.  Note: continuation lines are unwrapped
before comment processing is applied.
Kurt Zeilenga's avatar
Kurt Zeilenga committed
62
63
64
65
66
67
68
69
.LP
Arguments on configuration lines are separated by white space. If an
argument contains white space, the argument should be enclosed in
double quotes.  If an argument contains a double quote (`"') or a
backslash character (`\\'), the character should be preceded by a
backslash character.
.LP
The specific configuration options available are discussed below in the
70
71
Global Configuration Options, General Backend Options, and General Database
Options.  Backend-specific options are discussed in the
Howard Chu's avatar
Howard Chu committed
72
.B slapd\-<backend>(5)
73
74
manual pages.  Refer to the "OpenLDAP Administrator's Guide" for more
details on the slapd configuration file.
Kurt Zeilenga's avatar
Kurt Zeilenga committed
75
76
77
78
79
.SH GLOBAL CONFIGURATION OPTIONS
Options described in this section apply to all backends, unless specifically 
overridden in a backend definition. Arguments that should be replaced by 
actual text are shown in brackets <>.
.TP
Pierangelo Masarati's avatar
Pierangelo Masarati committed
80
.B access to <what> "[ by <who> <access> <control> ]+"
81
Grant access (specified by <access>) to a set of entries and/or
Kurt Zeilenga's avatar
Kurt Zeilenga committed
82
attributes (specified by <what>) by one or more requestors (specified
83
by <who>).
84
85
86
87
If no access controls are present, the default policy
allows anyone and everyone to read anything but restricts
updates to rootdn.  (e.g., "access to * by * read").
The rootdn can always read and write EVERYTHING!
Pierangelo Masarati's avatar
Pierangelo Masarati committed
88
89
90
See
.BR slapd.access (5)
and the "OpenLDAP's Administrator's Guide" for details.
91
.TP
92
.B allow <features>
93
94
Specify a set of features (separated by white space) to
allow (default none).
95
.B bind_v2
Kurt Zeilenga's avatar
Kurt Zeilenga committed
96
97
allows acceptance of LDAPv2 bind requests.  Note that
.BR slapd (8)
98
does not truly implement LDAPv2 (RFC 1777), now Historic (RFC 3494).
99
.B bind_anon_cred
Howard Chu's avatar
Howard Chu committed
100
allows anonymous bind when credentials are not empty (e.g.
101
102
103
when DN is empty).
.B bind_anon_dn
allows unauthenticated (anonymous) bind when DN is not empty.
Kurt Zeilenga's avatar
Kurt Zeilenga committed
104
.B update_anon
Pierangelo Masarati's avatar
Pierangelo Masarati committed
105
allows unauthenticated (anonymous) update operations to be processed
Kurt Zeilenga's avatar
Kurt Zeilenga committed
106
(subject to access controls and other administrative limits).
Pierangelo Masarati's avatar
Pierangelo Masarati committed
107
108
109
.B proxy_authz_anon
allows unauthenticated (anonymous) proxy authorization control to be processed
(subject to access controls, authorization and other administrative limits).
110
.TP
111
.B argsfile <filename>
112
The (absolute) name of a file that will hold the 
113
.B slapd
114
server's command line (program name and options).
115
116
117
.TP
.B attributeoptions [option-name]...
Define tagging attribute options or option tag/range prefixes.
Howard Chu's avatar
Howard Chu committed
118
119
Options must not end with `\-', prefixes must end with `\-'.
The `lang\-' prefix is predefined.
120
121
If you use the
.B attributeoptions
Howard Chu's avatar
Howard Chu committed
122
directive, `lang\-' will no longer be defined and you must specify it
123
124
125
126
127
explicitly if you want it defined.

An attribute description with a tagging option is a subtype of that
attribute description without the option.
Except for that, options defined this way have no special semantics.
Howard Chu's avatar
Howard Chu committed
128
Prefixes defined this way work like the `lang\-' options:
129
They define a prefix for tagging options starting with the prefix.
Howard Chu's avatar
Howard Chu committed
130
131
That is, if you define the prefix `x\-foo\-', you can use the option
`x\-foo\-bar'.
132
Furthermore, in a search or compare, a prefix or range name (with
Howard Chu's avatar
Howard Chu committed
133
134
135
a trailing `\-') matches all options starting with that name, as well
as the option with the range name sans the trailing `\-'.
That is, `x\-foo\-bar\-' matches `x\-foo\-bar' and `x\-foo\-bar\-baz'.
136

Howard Chu's avatar
Howard Chu committed
137
RFC 4520 reserves options beginning with `x\-' for private experiments.
Kurt Zeilenga's avatar
Kurt Zeilenga committed
138
Other options should be registered with IANA, see RFC 4520 section 3.5.
139
140
OpenLDAP also has the `binary' option built in, but this is a transfer
option, not a tagging option.
141
142
.HP
.hy 0
143
144
.B attributetype "(\ <oid>\
 [NAME\ <name>]\
145
 [DESC\ <description>]\
146
147
148
149
150
151
152
153
154
155
 [OBSOLETE]\
 [SUP\ <oid>]\
 [EQUALITY\ <oid>]\
 [ORDERING\ <oid>]\
 [SUBSTR\ <oid>]\
 [SYNTAX\ <oidlen>]\
 [SINGLE\-VALUE]\
 [COLLECTIVE]\
 [NO\-USER\-MODIFICATION]\
 [USAGE\ <attributeUsage>]\ )"
156
.RS
Kurt Zeilenga's avatar
Kurt Zeilenga committed
157
158
Specify an attribute type using the LDAPv3 syntax defined in RFC 4512.
The slapd parser extends the RFC 4512 definition by allowing string
Kurt Zeilenga's avatar
Kurt Zeilenga committed
159
160
forms as well as numeric OIDs to be used for the attribute OID and
attribute syntax OID.
161
(See the
162
.B objectidentifier
163
description.) 
164
.RE
165
.TP
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
.B authid\-rewrite<cmd> <args>
Used by the authentication framework to convert simple user names
to an LDAP DN used for authorization purposes.
Its purpose is analogous to that of
.BR authz-regexp
(see below).
The prefix \fIauthid\-\fP is followed by a set of rules analogous
to those described in
.BR slapo\-rwm (5)
for data rewriting (replace the \fIrwm\-\fP prefix with \fIauthid\-\fP).
.B authid\-rewrite<cmd>
and
.B authz\-regexp
rules should not be intermixed.
.TP
Howard Chu's avatar
Howard Chu committed
181
.B authz\-policy <policy>
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
Used to specify which rules to use for Proxy Authorization.  Proxy
authorization allows a client to authenticate to the server using one
user's credentials, but specify a different identity to use for authorization
and access control purposes. It essentially allows user A to login as user
B, using user A's password.
The
.B none
flag disables proxy authorization. This is the default setting.
The
.B from
flag will use rules in the
.I authzFrom
attribute of the authorization DN.
The
.B to
flag will use rules in the
.I authzTo
attribute of the authentication DN.
The
.B any
flag, an alias for the deprecated value of
.BR both ,
will allow any of the above, whatever succeeds first (checked in
.BR to ,
.B from
sequence.
The
.B all
flag requires both authorizations to succeed.
Pierangelo Masarati's avatar
Pierangelo Masarati committed
211
212
213
.LP
.RS
The rules are mechanisms to specify which identities are allowed 
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
to perform proxy authorization.
The
.I authzFrom
attribute in an entry specifies which other users
are allowed to proxy login to this entry. The
.I authzTo
attribute in
an entry specifies which other users this user can authorize as.  Use of
.I authzTo
rules can be easily
abused if users are allowed to write arbitrary values to this attribute.
In general the
.I authzTo
attribute must be protected with ACLs such that
only privileged users can modify it.
The value of
.I authzFrom
and
.I authzTo
describes an 
.B identity 
Quanah Gibson-Mount's avatar
Quanah Gibson-Mount committed
235
or a set of identities; it can take five forms:
236
237
238
239
240
241
242
243
.RS
.TP
.B ldap:///<base>??[<scope>]?<filter>
.RE
.RS
.B dn[.<dnstyle>]:<pattern>
.RE
.RS
Pierangelo Masarati's avatar
Pierangelo Masarati committed
244
.B u[.<mech>[/<realm>]]:<pattern>
245
246
.RE
.RS
Pierangelo Masarati's avatar
Pierangelo Masarati committed
247
248
249
.B group[/objectClass[/attributeType]]:<pattern>
.RE
.RS
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
.B <pattern>
.RE
.RS

.B <dnstyle>:={exact|onelevel|children|subtree|regex}

.RE
The first form is a valid LDAP
.B URI
where the 
.IR <host>:<port> ,
the
.I <attrs>
and the
.I <extensions>
portions must be absent, so that the search occurs locally on either
.I authzFrom
or 
.IR authzTo .
269
270

.LP
271
The second form is a 
272
273
274
275
.BR DN .
The optional
.B dnstyle
modifiers
276
277
278
279
280
.IR exact ,
.IR onelevel ,
.IR children ,
and
.I subtree
281
provide exact, onelevel, children and subtree matches, which cause 
282
.I <pattern>
283
284
285
286
to be normalized according to the DN normalization rules.
The special
.B dnstyle
modifier
287
.I regex
288
causes the
289
.I <pattern>
290
291
292
293
294
to be treated as a POSIX (''extended'') regular expression, as
discussed in
.BR regex (7)
and/or
.BR re_format (7).
Pierangelo Masarati's avatar
Pierangelo Masarati committed
295
296
297
A pattern of
.I *
means any non-anonymous DN.
298
299

.LP
300
The third form is a SASL
301
302
.BR id .
The optional fields
303
304
305
.I <mech>
and
.I <realm>
306
allow specification of a SASL
307
308
309
310
311
312
.BR mechanism ,
and eventually a SASL
.BR realm ,
for those mechanisms that support one.
The need to allow the specification of a mechanism is still debated, 
and users are strongly discouraged to rely on this possibility.
313
314
315
316

.LP
The fourth form is a group specification.
It consists of the keyword
Pierangelo Masarati's avatar
Pierangelo Masarati committed
317
.BR group ,
318
optionally followed by the specification of the group
Pierangelo Masarati's avatar
Pierangelo Masarati committed
319
.B objectClass
320
and
Pierangelo Masarati's avatar
Pierangelo Masarati committed
321
.BR attributeType .
322
323
324
The
.B objectClass
defaults to
325
.IR groupOfNames .
326
327
328
329
The
.B attributeType
defaults to
.IR member .
Pierangelo Masarati's avatar
Pierangelo Masarati committed
330
331
The group with DN
.B <pattern>
332
333
334
is searched with base scope, filtered on the specified
.BR objectClass .
The values of the resulting
Pierangelo Masarati's avatar
Pierangelo Masarati committed
335
336
.B attributeType
are searched for the asserted DN.
337
338
339
340

.LP
The fifth form is provided for backwards compatibility.  If no identity
type is provided, i.e. only
341
342
343
344
345
346
.B <pattern>
is present, an
.I exact DN
is assumed; as a consequence, 
.B <pattern>
is subjected to DN normalization.
347
348

.LP
349
350
351
352
353
354
Since the interpretation of
.I authzFrom
and
.I authzTo
can impact security, users are strongly encouraged 
to explicitly set the type of identity specification that is being used.
Pierangelo Masarati's avatar
Pierangelo Masarati committed
355
A subset of these rules can be used as third arg in the 
Howard Chu's avatar
Howard Chu committed
356
.B authz\-regexp
Pierangelo Masarati's avatar
Pierangelo Masarati committed
357
statement (see below); significantly, the 
Pierangelo Masarati's avatar
Pierangelo Masarati committed
358
359
.IR URI ,
provided it results in exactly one entry,
Pierangelo Masarati's avatar
Pierangelo Masarati committed
360
361
362
and the
.I dn.exact:<dn> 
forms.
363
364
.RE
.TP
Howard Chu's avatar
Howard Chu committed
365
.B authz\-regexp <match> <replace>
366
Used by the authentication framework to convert simple user names,
Pierangelo Masarati's avatar
Pierangelo Masarati committed
367
368
369
370
such as provided by SASL subsystem, or extracted from certificates
in case of cert-based SASL EXTERNAL, or provided within the RFC 4370
"proxied authorization" control, to an LDAP DN used for
authorization purposes.  Note that the resulting DN need not refer
371
372
373
374
375
376
377
378
379
380
to an existing entry to be considered valid.  When an authorization
request is received from the SASL subsystem, the SASL 
.BR USERNAME ,
.BR REALM , 
and
.B MECHANISM
are taken, when available, and combined into a name of the form
.RS
.RS
.TP
Pierangelo Masarati's avatar
typo    
Pierangelo Masarati committed
381
.B UID=<username>[[,CN=<realm>],CN=<mechanism>],CN=auth
382
383
384
385

.RE
This name is then compared against the
.B match
386
387
POSIX (''extended'') regular expression, and if the match is successful,
the name is replaced with the
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
.B replace
string.  If there are wildcard strings in the 
.B match
regular expression that are enclosed in parenthesis, e.g. 
.RS
.TP
.B UID=([^,]*),CN=.*

.RE
then the portion of the name that matched the wildcard will be stored
in the numbered placeholder variable $1. If there are other wildcard strings
in parenthesis, the matching strings will be in $2, $3, etc. up to $9. The 
placeholders can then be used in the 
.B replace
string, e.g. 
.RS
.TP
.B UID=$1,OU=Accounts,DC=example,DC=com 

.RE
408
409
410
The replaced name can be either a DN, i.e. a string prefixed by "dn:",
or an LDAP URI.
If the latter, the server will use the URI to search its own database(s)
411
412
and, if the search returns exactly one entry, the name is
replaced by the DN of that entry.   The LDAP URI must have no
413
414
hostport, attrs, or extensions components, but the filter is mandatory,
e.g.
415
416
417
418
419
.RS
.TP
.B ldap:///OU=Accounts,DC=example,DC=com??one?(UID=$1)

.RE
420
421
The protocol portion of the URI must be strictly
.BR ldap .
422
423
Note that this search is subject to access controls.  Specifically,
the authentication identity must have "auth" access in the subject.
424

425
Multiple 
Howard Chu's avatar
Howard Chu committed
426
.B authz\-regexp 
427
428
429
430
431
432
433
434
435
436
options can be given in the configuration file to allow for multiple matching 
and replacement patterns. The matching patterns are checked in the order they 
appear in the file, stopping at the first successful match.

.\".B Caution:
.\"Because the plus sign + is a character recognized by the regular expression engine,
.\"and it will appear in names that include a REALM, be careful to escape the
.\"plus sign with a backslash \\+ to remove the character's special meaning.
.RE
.TP
437
438
.B concurrency <integer>
Specify a desired level of concurrency.  Provided to the underlying
439
440
441
thread system as a hint.  The default is not to provide any hint. This setting
is only meaningful on some platforms where there is not a one to one
correspondence between user threads and kernel threads.
442
443
444
445
446
447
448
449
450
451
.TP
.B conn_max_pending <integer>
Specify the maximum number of pending requests for an anonymous session.
If requests are submitted faster than the server can process them, they
will be queued up to this limit. If the limit is exceeded, the session
is closed. The default is 100.
.TP
.B conn_max_pending_auth <integer>
Specify the maximum number of pending requests for an authenticated session.
The default is 1000.
Kurt Zeilenga's avatar
Kurt Zeilenga committed
452
.TP
453
454
455
.B defaultsearchbase <dn>
Specify a default search base to use when client submits a
non-base search request with an empty base DN.
456
Base scoped search requests with an empty base DN are not affected.
457
.TP
458
.B disallow <features>
459
460
Specify a set of features (separated by white space) to
disallow (default none).
461
.B bind_anon
462
463
disables acceptance of anonymous bind requests.  Note that this setting
does not prohibit anonymous directory access (See "require authc").
464
465
.B bind_simple
disables simple (bind) authentication.
466
.B tls_2_anon
Kurt Zeilenga's avatar
Kurt Zeilenga committed
467
disables forcing session to anonymous status (see also
Pierangelo Masarati's avatar
Pierangelo Masarati committed
468
469
.BR tls_authc )
upon StartTLS operation receipt.
470
.B tls_authc
Pierangelo Masarati's avatar
Pierangelo Masarati committed
471
disallows the StartTLS operation if authenticated (see also
472
.BR tls_2_anon ).
473
474
.B proxy_authz_non_critical
disables acceptance of the proxied authorization control (RFC4370)
475
with criticality set to FALSE.
476
477
.B dontusecopy_non_critical
disables acceptance of the dontUseCopy control (a work in progress)
478
with criticality set to FALSE.
479
480
481
482
483
484
485
486
487
488
489
.HP
.hy 0
.B ditcontentrule "(\ <oid>\
 [NAME\ <name>]\
 [DESC\ <description>]\
 [OBSOLETE]\
 [AUX\ <oids>]\
 [MUST\ <oids>]\
 [MAY\ <oids>]\
 [NOT\ <oids>]\ )"
.RS
Kurt Zeilenga's avatar
Kurt Zeilenga committed
490
491
Specify an DIT Content Rule using the LDAPv3 syntax defined in RFC 4512.
The slapd parser extends the RFC 4512 definition by allowing string
492
493
494
495
496
497
forms as well as numeric OIDs to be used for the attribute OID and
attribute syntax OID.
(See the
.B objectidentifier
description.) 
.RE
498
.TP
499
500
501
502
.B gentlehup { on | off }
A SIGHUP signal will only cause a 'gentle' shutdown-attempt:
.B Slapd
will stop listening for new connections, but will not close the
503
504
connections to the current clients.  Future write operations return
unwilling-to-perform, though.  Slapd terminates when all clients
505
have closed their connections (if they ever do), or \- as before \-
506
507
508
509
510
511
512
513
514
515
if it receives a SIGTERM signal.  This can be useful if you wish to
terminate the server and start a new
.B slapd
server
.B with another database,
without disrupting the currently active clients.
The default is off.  You may wish to use
.B idletimeout
along with this option.
.TP
516
517
.B idletimeout <integer>
Specify the number of seconds to wait before forcibly closing
518
an idle client connection.  A setting of 0 disables this
Howard Chu's avatar
Howard Chu committed
519
520
521
feature.  The default is 0. You may also want to set the
.B writetimeout
option.
522
.TP
Kurt Zeilenga's avatar
Kurt Zeilenga committed
523
524
525
.B include <filename>
Read additional configuration information from the given file before
continuing with the next line of the current file.
Howard Chu's avatar
Howard Chu committed
526
.TP
527
528
529
530
531
532
533
534
535
536
.B index_hash64 { on | off }
Use a 64 bit hash for indexing. The default is to use 32 bit hashes.
These hashes are used for equality and substring indexing. The 64 bit
version may be needed to avoid index collisions when the number of
indexed values exceeds ~64 million. (Note that substring indexing
generates multiple index values per actual attribute value.)
Indices generated with 32 bit hashes are incompatible with the 64 bit
version, and vice versa. Any existing databases must be fully reloaded
when changing this setting. This directive is only supported on 64 bit CPUs.
.TP
Howard Chu's avatar
Howard Chu committed
537
538
.B index_intlen <integer>
Specify the key length for ordered integer indices. The most significant
Howard Chu's avatar
Howard Chu committed
539
bytes of the binary integer will be used for index keys. The default
540
541
value is 4, which provides exact indexing for 31 bit values.
A floating point representation is used to index too large values.
Howard Chu's avatar
Howard Chu committed
542
.TP
Howard Chu's avatar
Howard Chu committed
543
544
545
546
547
.B index_substr_if_maxlen <integer>
Specify the maximum length for subinitial and subfinal indices. Only
this many characters of an attribute value will be processed by the
indexing functions; any excess characters are ignored. The default is 4.
.TP
548
549
550
551
552
.B index_substr_if_minlen <integer>
Specify the minimum length for subinitial and subfinal indices. An
attribute value must have at least this many characters in order to be
processed by the indexing functions. The default is 2.
.TP
Howard Chu's avatar
Howard Chu committed
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
.B index_substr_any_len <integer>
Specify the length used for subany indices. An attribute value must have
at least this many characters in order to be processed. Attribute values
longer than this length will be processed in segments of this length. The
default is 4. The subany index will also be used in subinitial and
subfinal index lookups when the filter string is longer than the
.I index_substr_if_maxlen
value.
.TP
.B index_substr_any_step <integer>
Specify the steps used in subany index lookups. This value sets the offset
for the segments of a filter string that are processed for a subany index
lookup. The default is 2. For example, with the default values, a search
using this filter "cn=*abcdefgh*" would generate index lookups for
"abcd", "cdef", and "efgh".
Howard Chu's avatar
Howard Chu committed
568

Howard Chu's avatar
Howard Chu committed
569
570
571
.LP
Note: Indexing support depends on the particular backend in use. Also,
changing these settings will generally require deleting any indices that
Howard Chu's avatar
Howard Chu committed
572
573
depend on these parameters and recreating them with
.BR slapindex (8).
Howard Chu's avatar
Howard Chu committed
574

575
576
577
578
.HP
.hy 0
.B ldapsyntax "(\ <oid>\
 [DESC\ <description>]\
Howard Chu's avatar
Howard Chu committed
579
 [X\-SUBST <substitute-syntax>]\ )"
580
581
582
583
584
585
586
587
.RS
Specify an LDAP syntax using the LDAPv3 syntax defined in RFC 4512.
The slapd parser extends the RFC 4512 definition by allowing string
forms as well as numeric OIDs to be used for the syntax OID.
(See the
.B objectidentifier
description.) 
The slapd parser also honors the
Howard Chu's avatar
Howard Chu committed
588
.B X\-SUBST
589
extension (an OpenLDAP-specific extension), which allows one to use the
590
591
592
.B ldapsyntax
statement to define a non-implemented syntax along with another syntax,
the extension value
Howard Chu's avatar
Howard Chu committed
593
.IR substitute-syntax ,
594
595
as its temporary replacement.
The
Howard Chu's avatar
Howard Chu committed
596
.I substitute-syntax
597
must be defined.
598
This allows one to define attribute types that make use of non-implemented syntaxes
599
600
using the correct syntax OID.
Unless 
Howard Chu's avatar
Howard Chu committed
601
.B X\-SUBST
602
603
604
605
is used, this configuration statement would result in an error,
since no handlers would be associated to the resulting syntax structure.
.RE

606
607
608
609
610
.TP
.B listener-threads <integer>
Specify the number of threads to use for the connection manager.
The default is 1 and this is typically adequate for up to 16 CPU cores.
The value should be set to a power of 2.
611
.TP
612
613
614
615
616
617
.B localSSF <SSF>
Specifies the Security Strength Factor (SSF) to be given local LDAP sessions,
such as those to the ldapi:// listener.  For a description of SSF values,
see 
.BR sasl-secprops 's
.B minssf
Kurt Zeilenga's avatar
Kurt Zeilenga committed
618
option description.  The default is 71.
619
.TP
620
.B logfile <filename>
621
622
623
624
625
626
Specify a file for recording slapd debug messages. By default these messages
only go to stderr, are not recorded anywhere else, and are unrelated to
messages exposed by the
.B loglevel
configuration parameter. Specifying a logfile copies messages to both stderr
and the logfile.
627
.TP
628
629
630
631
632
633
634
635
636
637
638
639
640
.B logfile-only on | off
Specify that debug messages should only go to the configured logfile, and
not to stderr.
.TP
.B logfile-rotate <max> <Mbytes> <hours>
Specify automatic rotation for the configured logfile as the maximum
number of old logfiles to retain, a maximum size in megabytes to allow a
logfile to grow before rotation, and a maximum age in hours for a logfile
to be used before rotation. The maximum number must be in the range 1-99.
Setting Mbytes or hours to zero disables the size or age check, respectively.
At least one of Mbytes or hours must be non-zero. By default no automatic
rotation will be performed.
.TP
641
.B loglevel <integer> [...]
Kurt Zeilenga's avatar
Kurt Zeilenga committed
642
643
644
Specify the level at which debugging statements and operation 
statistics should be syslogged (currently logged to the
.BR syslogd (8) 
645
646
647
648
LOG_LOCAL4 facility).
They must be considered subsystems rather than increasingly verbose 
log levels.
Some messages with higher priority are logged regardless 
Howard Chu's avatar
Howard Chu committed
649
of the configured loglevel as soon as any logging is configured.
650
Log levels are additive, and available levels are:
Kurt Zeilenga's avatar
Kurt Zeilenga committed
651
652
653
654
655
.RS
.RS
.PD 0
.TP
.B 1
656
.B (0x1 trace)
Kurt Zeilenga's avatar
Kurt Zeilenga committed
657
658
659
trace function calls
.TP
.B 2
660
.B (0x2 packets)
Kurt Zeilenga's avatar
Kurt Zeilenga committed
661
662
663
debug packet handling
.TP
.B 4
664
665
.B (0x4 args)
heavy trace debugging (function args)
Kurt Zeilenga's avatar
Kurt Zeilenga committed
666
667
.TP
.B 8
668
.B (0x8 conns)
Kurt Zeilenga's avatar
Kurt Zeilenga committed
669
670
671
connection management
.TP
.B 16
672
.B (0x10 BER)
Kurt Zeilenga's avatar
Kurt Zeilenga committed
673
674
675
print out packets sent and received
.TP
.B 32
676
.B (0x20 filter)
Kurt Zeilenga's avatar
Kurt Zeilenga committed
677
678
679
search filter processing
.TP
.B 64
680
.B (0x40 config)
Kurt Zeilenga's avatar
Kurt Zeilenga committed
681
682
683
configuration file processing
.TP
.B 128
684
.B (0x80 ACL)
Kurt Zeilenga's avatar
Kurt Zeilenga committed
685
686
687
access control list processing
.TP
.B 256
688
.B (0x100 stats)
Hallvard Furuseth's avatar
Hallvard Furuseth committed
689
connections, LDAP operations, results (recommended)
Kurt Zeilenga's avatar
Kurt Zeilenga committed
690
691
.TP
.B 512
692
.B (0x200 stats2)
693
stats2 log entries sent
Kurt Zeilenga's avatar
Kurt Zeilenga committed
694
695
.TP
.B 1024
696
.B (0x400 shell)
Kurt Zeilenga's avatar
Kurt Zeilenga committed
697
698
699
print communication with shell backends
.TP
.B 2048
700
.B (0x800 parse)
Kurt Zeilenga's avatar
Kurt Zeilenga committed
701
entry parsing
702
703
704
705
706
707
708
709
\".TP
\".B 4096
\".B (0x1000 cache)
\"caching (unused)
\".TP
\".B 8192
\".B (0x2000 index)
\"data indexing (unused)
710
711
712
713
714
715
.TP
.B 16384
.B (0x4000 sync)
LDAPSync replication
.TP
.B 32768
716
.B (0x8000 none)
717
only messages that get logged whatever log level is set
Kurt Zeilenga's avatar
Kurt Zeilenga committed
718
719
.PD
.RE
720
The desired log level can be input as a single integer that combines 
721
722
the (ORed) desired levels, both in decimal or in hexadecimal notation,
as a list of integers (that are ORed internally),
723
or as a list of the names that are shown between parentheses, such that
724
725
726
.LP
.nf
    loglevel 129
727
    loglevel 0x81
728
    loglevel 128 1
729
    loglevel 0x80 0x1
730
731
732
733
734
735
    loglevel acl trace
.fi
.LP
are equivalent.
The keyword 
.B any
Howard Chu's avatar
Howard Chu committed
736
can be used as a shortcut to enable logging at all levels (equivalent to \-1).
737
738
739
740
The keyword
.BR none ,
or the equivalent integer representation, causes those messages
that are logged regardless of the configured loglevel to be logged.
741
In fact, if loglevel is set to 0, no logging occurs, 
742
743
744
so at least the 
.B none
level is required to have high priority messages logged.
Hallvard Furuseth's avatar
Hallvard Furuseth committed
745

746
747
748
749
750
751
752
753
Note that the
.BR packets ,
.BR BER ,
and
.B parse
levels are only available as debug output on stderr, and are not
sent to syslog.

754
The loglevel defaults to \fBstats\fP.
755
This level should usually also be included when using other loglevels, to
Hallvard Furuseth's avatar
Hallvard Furuseth committed
756
help analyze the logs.
Kurt Zeilenga's avatar
Kurt Zeilenga committed
757
.RE
758
.TP
759
760
761
762
.B maxfilterdepth <integer>
Specify the maximum depth of nested filters in search requests.
The default is 1000.
.TP
763
764
765
.B moduleload <filename> [<arguments>...]
Specify the name of a dynamically loadable module to load and any
additional arguments if supported by the module. The filename
766
767
768
769
770
may be an absolute path name or a simple filename. Non-absolute names
are searched for in the directories specified by the
.B modulepath
option. This option and the
.B modulepath
Howard Chu's avatar
Howard Chu committed
771
option are only usable if slapd was compiled with \-\-enable\-modules.
772
773
774
775
.TP
.B modulepath <pathspec>
Specify a list of directories to search for loadable modules. Typically
the path is colon-separated but this depends on the operating system.
776
777
The default is MODULEDIR, which is where the standard OpenLDAP install
will place its modules.
778
.HP
779
780
781
.hy 0
.B objectclass "(\ <oid>\
 [NAME\ <name>]\
782
 [DESC\ <description>]\
783
784
785
786
 [OBSOLETE]\
 [SUP\ <oids>]\
 [{ ABSTRACT | STRUCTURAL | AUXILIARY }]\
 [MUST\ <oids>] [MAY\ <oids>] )"
787
.RS
Kurt Zeilenga's avatar
Kurt Zeilenga committed
788
789
Specify an objectclass using the LDAPv3 syntax defined in RFC 4512.
The slapd parser extends the RFC 4512 definition by allowing string
Kurt Zeilenga's avatar
Kurt Zeilenga committed
790
791
forms as well as numeric OIDs to be used for the object class OID.
(See the
792
793
.B
objectidentifier
Kurt Zeilenga's avatar
Kurt Zeilenga committed
794
description.)  Object classes are "STRUCTURAL" by default.
795
.RE
796
.TP
Pierangelo Masarati's avatar
Pierangelo Masarati committed
797
.B objectidentifier <name> "{ <oid> | <name>[:<suffix>] }"
798
799
800
801
Define a string name that equates to the given OID. The string can be used
in place of the numeric OID in objectclass and attribute definitions. The
name can also be used with a suffix of the form ":xx" in which case the
value "oid.xx" will be used.
Kurt Zeilenga's avatar
Kurt Zeilenga committed
802
.TP
Howard Chu's avatar
Howard Chu committed
803
.B password\-hash <hash> [<hash>...]
804
805
This option configures one or more hashes to be used in generation of user
passwords stored in the userPassword attribute during processing of
Kurt Zeilenga's avatar
Kurt Zeilenga committed
806
LDAP Password Modify Extended Operations (RFC 3062).
807
The <hash> must be one of
808
809
810
811
.BR {SSHA} ,
.BR {SHA} ,
.BR {SMD5} ,
.BR {MD5} ,
812
.BR {CRYPT} ,
813
and
814
.BR {CLEARTEXT} .
815
816
The default is
.BR {SSHA} .
817

818
819
820
821
.B {SHA}
and
.B {SSHA}
use the SHA-1 algorithm (FIPS 160-1), the latter with a seed.
822

823
824
825
826
.B {MD5}
and
.B {SMD5}
use the MD5 algorithm (RFC 1321), the latter with a seed.
827

828
829
830
.B {CRYPT}
uses the
.BR crypt (3).
831

832
833
834
.B {CLEARTEXT}
indicates that the new password should be
added to userPassword as clear text.
835

836
Note that this option does not alter the normal user applications
837
handling of userPassword during LDAP Add, Modify, or other LDAP operations.
838
.TP
839
.B password\-crypt\-salt\-format <format>
840
841
Specify the format of the salt passed to
.BR crypt (3)
842
843
844
845
when generating {CRYPT} passwords (see
.BR password\-hash )
during processing of LDAP Password Modify Extended Operations (RFC 3062).

846
847
848
This string needs to be in
.BR sprintf (3)
format and may include one (and only one) %s conversion.
849
This conversion will be substituted with a string of random
850
851
852
853
854
855
characters from [A\-Za\-z0\-9./].  For example, "%.2s"
provides a two character salt and "$1$%.8s" tells some
versions of crypt(3) to use an MD5 algorithm and provides
8 random characters of salt.  The default is "%s", which
provides 31 characters of salt.
.TP
Kurt Zeilenga's avatar
Kurt Zeilenga committed
856
.B pidfile <filename>
857
The (absolute) name of a file that will hold the 
Kurt Zeilenga's avatar
Kurt Zeilenga committed
858
.B slapd
859
860
server's process ID (see
.BR getpid (2)).
Kurt Zeilenga's avatar
Kurt Zeilenga committed
861
.TP
862
863
864
865
866
867
868
869
.B pluginlog: <filename>
The ( absolute ) name of a file that will contain log
messages from
.B SLAPI
plugins. See
.BR slapd.plugin (5)
for details.
.TP
Kurt Zeilenga's avatar
Kurt Zeilenga committed
870
871
872
873
.B referral <url>
Specify the referral to pass back when
.BR slapd (8)
cannot find a local database to handle a request.
874
If specified multiple times, each url is provided.
Kurt Zeilenga's avatar
Kurt Zeilenga committed
875
.TP
876
.B require <conditions>
877
878
Specify a set of conditions (separated by white space) to
require (default none).
879
880
881
The directive may be specified globally and/or per-database;
databases inherit global conditions, so per-database specifications
are additive.
882
883
884
885
886
887
888
889
890
891
.B bind
requires bind operation prior to directory operations.
.B LDAPv3
requires session to be using LDAP version 3.
.B authc
requires authentication prior to directory operations.
.B SASL
requires SASL authentication prior to directory operations.
.B strong
requires strong authentication prior to directory operations.
892
893
The strong keyword allows protected "simple" authentication
as well as SASL authentication.
894
.B none
895
896
897
may be used to require no conditions (useful to clear out globally
set conditions within a particular database); it must occur first
in the list of conditions.
898
.TP
Howard Chu's avatar
Howard Chu committed
899
.B reverse\-lookup on | off
900
901
Enable/disable client name unverified reverse lookup (default is 
.BR off 
Howard Chu's avatar
Howard Chu committed
902
if compiled with \-\-enable\-rlookups).
903
.TP
Kurt Zeilenga's avatar
Kurt Zeilenga committed
904
.B rootDSE <file>
905
906
907
Specify the name of an LDIF(5) file containing user defined attributes
for the root DSE.  These attributes are returned in addition to the
attributes normally produced by slapd.
Hallvard Furuseth's avatar
Hallvard Furuseth committed
908
909
910
911
912

The root DSE is an entry with information about the server and its
capabilities, in operational attributes.
It has the empty DN, and can be read with e.g.:
.ti +4
Howard Chu's avatar
Howard Chu committed
913
ldapsearch \-x \-b "" \-s base "+"
Hallvard Furuseth's avatar
Hallvard Furuseth committed
914
915
.br
See RFC 4512 section 5.1 for details.
916
.TP
Howard Chu's avatar
Howard Chu committed
917
.B sasl\-auxprops <plugin> [...]
Howard Chu's avatar
Howard Chu committed
918
919
920
921
Specify which auxprop plugins to use for authentication lookups. The
default is empty, which just uses slapd's internal support. Usually
no other auxprop plugins are needed.
.TP
922
923
924
925
926
927
928
929
.B sasl\-auxprops\-dontusecopy <attr> [...]
Specify which attribute(s) should be subject to the don't use copy control. This
is necessary for some SASL mechanisms such as OTP to work in a replicated
environment. The attribute "cmusaslsecretOTP" is the default value.
.TP
.B sasl\-auxprops\-dontusecopy\-ignore on | off
Used to disable replication of the attribute(s) defined by
sasl-auxprops-dontusecopy and instead use a local value for the attribute. This
930
allows the SASL mechanism to continue to work if the provider is offline. This can
931
932
cause replication inconsistency. Defaults to off.
.TP
Howard Chu's avatar
Howard Chu committed
933
.B sasl\-host <fqdn>
Kurt Zeilenga's avatar
Kurt Zeilenga committed
934
935
Used to specify the fully qualified domain name used for SASL processing.
.TP
Howard Chu's avatar
Howard Chu committed
936
.B sasl\-realm <realm>
Kurt Zeilenga's avatar
Kurt Zeilenga committed
937
Specify SASL realm.  Default is empty.
Kurt Zeilenga's avatar
Kurt Zeilenga committed
938
.TP
939
940
941
942
.B sasl\-cbinding none | tls-unique | tls-endpoint
Specify the channel-binding type, see also LDAP_OPT_X_SASL_CBINDING.
Default is none.
.TP
Howard Chu's avatar
Howard Chu committed
943
.B sasl\-secprops <properties>
Kurt Zeilenga's avatar
Kurt Zeilenga committed
944
945
946
Used to specify Cyrus SASL security properties.
The
.B none
947
flag (without any other properties) causes the flag properties
Kurt Zeilenga's avatar
Kurt Zeilenga committed
948
949
950
951
952
953
954
955
956
957
958
default, "noanonymous,noplain", to be cleared.
The
.B noplain
flag disables mechanisms susceptible to simple passive attacks.
The
.B noactive
flag disables mechanisms susceptible to active attacks.
The
.B nodict
flag disables mechanisms susceptible to passive dictionary attacks.
The
Kurt Zeilenga's avatar
Kurt Zeilenga committed
959
.B noanonymous
Kurt Zeilenga's avatar
Kurt Zeilenga committed
960
961
962
963
964
965
966
967
968
969
970
971
972
973
flag disables mechanisms which support anonymous login.
The
.B forwardsec
flag require forward secrecy between sessions.
The
.B passcred
require mechanisms which pass client credentials (and allow
mechanisms which can pass credentials to do so).
The
.B minssf=<factor> 
property specifies the minimum acceptable
.I security strength factor
as an integer approximate to effective key length used for
encryption.  0 (zero) implies no protection, 1 implies integrity
974
975
protection only, 128 allows RC4, Blowfish and other similar ciphers,
256 will require modern ciphers.  The default is 0.
Kurt Zeilenga's avatar
Kurt Zeilenga committed
976
977
978
979
980
981
The
.B maxssf=<factor> 
property specifies the maximum acceptable
.I security strength factor
as an integer (see minssf description).  The default is INT_MAX.
The
Kurt Zeilenga's avatar
Kurt Zeilenga committed
982
.B maxbufsize=<size> 
Kurt Zeilenga's avatar
Kurt Zeilenga committed
983
984
985
property specifies the maximum security layer receive buffer
size allowed.  0 disables security layers.  The default is 65536.
.TP
986
987
988
989
.B schemadn <dn>
Specify the distinguished name for the subschema subentry that
controls the entries on this server.  The default is "cn=Subschema".
.TP
990
.B security <factors>
Kurt Zeilenga's avatar
Kurt Zeilenga committed
991
992
Specify a set of security strength factors (separated by white space)
to require (see
Howard Chu's avatar
Howard Chu committed
993
.BR sasl\-secprops 's
Kurt Zeilenga's avatar
Kurt Zeilenga committed
994
995
.B minssf
option for a description of security strength factors).
996
997
998
999
1000
The directive may be specified globally and/or per-database.
.B ssf=<n>
specifies the overall security strength factor.
.B transport=<n>
specifies the transport security strength factor.