ldap.conf.5 11.4 KB
Newer Older
1
.TH LDAP.CONF 5 "RELEASEDATE" "OpenLDAP LDVERSION"
Kurt Zeilenga's avatar
Kurt Zeilenga committed
2
.\" $OpenLDAP$
Kurt Zeilenga's avatar
Kurt Zeilenga committed
3
.\" Copyright 1998-2007 The OpenLDAP Foundation All Rights Reserved.
Kurt Zeilenga's avatar
Kurt Zeilenga committed
4
.\" Copying restrictions apply.  See COPYRIGHT/LICENSE.
Kurt Zeilenga's avatar
Kurt Zeilenga committed
5
.SH NAME
Kurt Zeilenga's avatar
Kurt Zeilenga committed
6
ldap.conf, .ldaprc \- ldap configuration file
Kurt Zeilenga's avatar
Kurt Zeilenga committed
7
.SH SYNOPSIS
8
ETCDIR/ldap.conf, .ldaprc
Kurt Zeilenga's avatar
Kurt Zeilenga committed
9
.SH DESCRIPTION
10
11
12
If the environment variable \fBLDAPNOINIT\fP is defined, all
defaulting is disabled.
.LP
Kurt Zeilenga's avatar
Kurt Zeilenga committed
13
14
15
16
17
The
.I ldap.conf
configuration file is used to set system-wide defaults to be applied when
running
.I ldap
18
clients.
19
.LP
20
21
Users may create an optional configuration file,
.I ldaprc
22
or
Kurt Zeilenga's avatar
Kurt Zeilenga committed
23
.IR .ldaprc ,
24
in their home directory which will be used to override the system-wide
25
defaults file.
26
The file
27
.I ldaprc
28
in the current working directory is also used.
29
.LP
30
.LP
31
32
Additional configuration files can be specified using
the \fBLDAPCONF\fP and \fBLDAPRC\fP environment variables.
33
34
35
\fBLDAPCONF\fP may be set to the path of a configuration file.  This
path can be absolute or relative to the current working directory.
The \fBLDAPRC\fP, if defined, should be the basename of a file
36
37
38
in the current working directory or in the user's home directory.
.LP
Environmental variables may also be used to augment the file based defaults.
39
40
41
The name of the variable is the option name with an added prefix of \fBLDAP\fP.
For example, to define \fBBASE\fP via the environment, set the variable
\fBLDAPBASE\fP to the desired value.
42
43
44
.LP
Some options are user\-only.  Such options are ignored if present
in the
45
.I ldap.conf
46
47
(or file specified by
.BR LDAPCONF ).
Kurt Zeilenga's avatar
Kurt Zeilenga committed
48
.SH OPTIONS
49
50
The configuration options are case-insensitive;
their value, on a case by case basis, may be case-sensitive.
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
.LP
Blank lines and lines beginning with a hash mark (`#')
are ignored up to their end.
.LP
Valid lines are made of an option's name (a sequence of non-blanks,
conventionally written in uppercase, although not required), 
followed by a value.
The value starts with the first non-blank character after 
the option's name, and terminates at the end of the line, 
or at the last sequence of blanks before the end of the line.
The tokenization of the value, if any, is delegated to the handler(s)
for that option, if any.  Quoting values that contain blanks 
may be incorrect, as the quotes would become part of the value.
For example,

	URI	"ldap:// ldaps://"

is incorrect, while

	URI	ldap:// ldaps://

is correct (note the absence of the double quotes).
.LP
A line cannot be longer than LINE_MAX, which should be more than 2000 bytes
on all platforms.
There is no mechanism to split a long line on multiple lines, either for
beautification or to overcome the above limit.
.LP
Kurt Zeilenga's avatar
Kurt Zeilenga committed
79
The different configuration options are:
80
.TP
Pierangelo Masarati's avatar
Pierangelo Masarati committed
81
.B URI <ldap[si]://[name[:port]] ...>
82
83
Specifies the URI(s) of an LDAP server(s) to which the
.I LDAP 
Pierangelo Masarati's avatar
Pierangelo Masarati committed
84
85
library should connect.  The URI scheme may be any of
.BR ldap ,
86
.B ldaps 
Pierangelo Masarati's avatar
Pierangelo Masarati committed
87
88
89
or
.BR ldapi ,
which refer to LDAP over TCP, LDAP over SSL (TLS) and LDAP
Pierangelo Masarati's avatar
Pierangelo Masarati committed
90
over IPC (UNIX domain sockets), respectively.
91
92
93
94
95
Each server's name can be specified as a
domain-style name or an IP address literal.  Optionally, the
server's name can followed by a ':' and the port number the LDAP
server is listening on.  If no port number is provided, the default
port for the scheme is used (389 for ldap://, 636 for ldaps://).
Pierangelo Masarati's avatar
Pierangelo Masarati committed
96
For LDAP over IPC,
Pierangelo Masarati's avatar
Pierangelo Masarati committed
97
98
99
.B name 
is the name of the socket, and no
.B port
Pierangelo Masarati's avatar
Pierangelo Masarati committed
100
101
102
is required, nor allowed; note that directory separators must be 
URL-encoded, like any other characters that are special to URLs; 
so the socket
Pierangelo Masarati's avatar
Pierangelo Masarati committed
103
104
105
106
107
108
109

	/usr/local/var/ldapi

must be specified as

	ldapi://%2Fusr%2Flocal%2Fvar%2Fldapi

110
111
A space separated list of URIs may be provided.
.TP
112
113
.B BASE <base>
Specifies the default base DN to use when performing ldap operations.
Kurt Zeilenga's avatar
Kurt Zeilenga committed
114
The base must be specified as a Distinguished Name in LDAP format.
115
116
117
.TP
.B BINDDN <dn>
Specifies the default bind DN to use when performing ldap operations.
118
The bind DN must be specified as a Distinguished Name in LDAP format.
119
.B This is a user\-only option.
120
.TP
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
.B DEREF <when>
Specifies how alias dereferencing is done when performing a search. The
.B <when>
can be specified as one of the following keywords:
.RS
.TP
.B never
Aliases are never dereferenced. This is the default.
.TP
.B searching
Aliases are dereferenced in subordinates of the base object, but
not in locating the base object of the search.
.TP
.B finding
Aliases are only dereferenced when locating the base object of the search.
.TP
.B always
Aliases are dereferenced both in searching and in locating the base object
of the search.
.RE
.TP
.TP
143
144
.B HOST <name[:port] ...>
Specifies the name(s) of an LDAP server(s) to which the
145
.I LDAP 
146
147
library should connect.  Each server's name can be specified as a
domain-style name or an IP address and optionally followed by a ':' and
Kurt Zeilenga's avatar
Kurt Zeilenga committed
148
the port number the ldap server is listening on.  A space separated
149
list of hosts may be provided.
150
151
.B HOST
is deprecated in favor of
152
.BR URI .
153
.TP
154
155
156
157
.B NETWORK_TIMEOUT <integer>
Specifies the timeout (in seconds) after which the poll(2)/select(2)
following a connect(2) returns in case of no activity.
.TP
158
159
.B PORT <port>
Specifies the default port used when connecting to LDAP servers(s).
Kurt Zeilenga's avatar
Kurt Zeilenga committed
160
The port may be specified as a number.
161
162
163
164
.B PORT
is deprecated in favor of
.BR URI.
.TP
Hallvard Furuseth's avatar
Hallvard Furuseth committed
165
166
167
168
169
170
171
.B REFERRALS <on/true/yes/off/false/no>
Specifies if the client should automatically follow referrals returned
by LDAP servers.
The default is on.
Note that the command line tools
.BR ldapsearch (1)
&co always override this option.
172
173
174
175
.\" This should only be allowed via ldap_set_option(3)
.\".TP
.\".B RESTART <on/true/yes/off/false/no>
.\"Determines whether the library should implicitly restart connections (FIXME).
176
.TP
177
178
179
180
181
182
183
184
185
.B SIZELIMIT <integer>
Specifies a size limit to use when performing searches.  The
number should be a non-negative integer.  \fISIZELIMIT\fP of zero (0)
specifies unlimited search size.
.TP
.B TIMELIMIT <integer>
Specifies a time limit to use when performing searches.  The
number should be a non-negative integer.  \fITIMELIMIT\fP of zero (0)
specifies unlimited search time to be used.
186
187
188
189
.B VERSION {2|3}
Specifies what version of the LDAP protocol should be used.
.TP
.B TIMEOUT <integer>
190
191
192
193
Specifies a timeout (in seconds) after which calls to synchronous LDAP
APIs will abort if no response is received.  Also used for any
.BR ldap_result (3)
calls where a NULL timeout parameter is supplied.
194
195
196
197
198
199
.SH SASL OPTIONS
If OpenLDAP is built with Simple Authentication and Security Layer support,
there are more options you can specify.
.TP
.B SASL_MECH <mechanism>
Specifies the SASL mechanism to use.
200
.B This is a user\-only option.
201
202
203
.TP
.B SASL_REALM <realm>
Specifies the SASL realm.
204
.B This is a user\-only option.
205
206
207
.TP
.B SASL_AUTHCID <authcid>
Specifies the authentication identity.
208
.B This is a user\-only option.
209
210
211
.TP
.B SASL_AUTHZID <authcid>
Specifies the proxy authorization identity.
212
.B This is a user\-only option.
213
214
215
216
217
218
219
.TP
.B SASL_SECPROPS <properties>
Specifies Cyrus SASL security properties. The 
.B <properties>
can be specified as a comma-separated list of the following:
.RS
.TP
Kurt Zeilenga's avatar
Kurt Zeilenga committed
220
.B none
221
(without any other properties) causes the properties
Kurt Zeilenga's avatar
Kurt Zeilenga committed
222
defaults ("noanonymous,noplain") to be cleared.
223
.TP
Kurt Zeilenga's avatar
Kurt Zeilenga committed
224
.B noplain
225
226
disables mechanisms susceptible to simple passive attacks.
.TP
Kurt Zeilenga's avatar
Kurt Zeilenga committed
227
.B noactive
228
229
disables mechanisms susceptible to active attacks.
.TP
Kurt Zeilenga's avatar
Kurt Zeilenga committed
230
.B nodict
231
232
233
234
235
disables mechanisms susceptible to passive dictionary attacks.
.TP
.B noanonymous
disables mechanisms which support anonymous login.
.TP
Kurt Zeilenga's avatar
Kurt Zeilenga committed
236
.B forwardsec
237
238
requires forward secrecy between sessions.
.TP
Kurt Zeilenga's avatar
Kurt Zeilenga committed
239
.B passcred
240
requires mechanisms which pass client credentials (and allows
Kurt Zeilenga's avatar
Kurt Zeilenga committed
241
mechanisms which can pass credentials to do so).
242
.TP
Kurt Zeilenga's avatar
Kurt Zeilenga committed
243
.B minssf=<factor> 
244
specifies the minimum acceptable
Kurt Zeilenga's avatar
Kurt Zeilenga committed
245
.I security strength factor
246
as an integer approximating the effective key length used for
Kurt Zeilenga's avatar
Kurt Zeilenga committed
247
248
249
250
encryption.  0 (zero) implies no protection, 1 implies integrity
protection only, 56 allows DES or other weak ciphers, 112
allows triple DES and other strong ciphers, 128 allows RC4,
Blowfish and other modern strong ciphers.  The default is 0.
251
.TP
Kurt Zeilenga's avatar
Kurt Zeilenga committed
252
.B maxssf=<factor> 
253
specifies the maximum acceptable
Kurt Zeilenga's avatar
Kurt Zeilenga committed
254
.I security strength factor
255
256
257
258
259
as an integer (see
.B minssf
description).  The default is
.BR INT_MAX .
.TP
Kurt Zeilenga's avatar
Kurt Zeilenga committed
260
.B maxbufsize=<factor> 
261
specifies the maximum security layer receive buffer
Kurt Zeilenga's avatar
Kurt Zeilenga committed
262
size allowed.  0 disables security layers.  The default is 65536.
263
264
.RE
.SH TLS OPTIONS
265
If OpenLDAP is built with Transport Layer Security support, there
Kurt Zeilenga's avatar
Kurt Zeilenga committed
266
267
268
are more options you can specify.  These options are used when an
.B ldaps:// URI
is selected (by default or otherwise) or when the application
Kurt Zeilenga's avatar
Kurt Zeilenga committed
269
negotiates TLS by issuing the LDAP StartTLS operation.
270
271
272
273
274
275
276
277
.TP
.B TLS_CACERT <filename>
Specifies the file that contains certificates for all of the Certificate
Authorities the client will recognize.
.TP
.B TLS_CACERTDIR <path>
Specifies the path of a directory that contains Certificate Authority
certificates in separate individual files. The
Howard Chu's avatar
Howard Chu committed
278
279
.B TLS_CACERT
is always used before
280
281
282
.B TLS_CACERTDIR.
.TP
.B TLS_CERT <filename>
283
Specifies the file that contains the client certificate.
284
.B This is a user\-only option.
285
286
287
288
289
290
.TP
.B TLS_KEY <filename>
Specifies the file that contains the private key that matches the certificate
stored in the
.B TLS_CERT
file. Currently, the private key must not be protected with a password, so
291
292
it is of critical importance that the key file is protected carefully.
.B This is a user\-only option.
293
.TP
294
295
296
297
298
.B TLS_CIPHER_SUITE <cipher-suite-spec>
Specifies acceptable cipher suite and preference order.
<cipher-suite-spec> should be a cipher specification for OpenSSL,
e.g., HIGH:MEDIUM:+SSLv2.
.TP
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
.B TLS_RANDFILE <filename>
Specifies the file to obtain random bits from when /dev/[u]random is
not available. Generally set to the name of the EGD/PRNGD socket.
The environment variable RANDFILE can also be used to specify the filename.
.TP
.B TLS_REQCERT <level>
Specifies what checks to perform on server certificates in a TLS session,
if any. The
.B <level>
can be specified as one of the following keywords:
.RS
.TP
.B never
The client will not request or check any server certificate.
.TP
.B allow
The server certificate is requested. If no certificate is provided,
the session proceeds normally. If a bad certificate is provided, it will
be ignored and the session proceeds normally.
.TP
.B try
The server certificate is requested. If no certificate is provided,
the session proceeds normally. If a bad certificate is provided,
the session is immediately terminated.
.TP
.B demand | hard
These keywords are equivalent. The server certificate is requested. If no
certificate is provided, or a bad certificate is provided, the session
is immediately terminated. This is the default setting.
Hallvard Furuseth's avatar
Hallvard Furuseth committed
328
.RE
329
330
331
.TP
.B TLS_CRLCHECK <level>
Specifies if the Certificate Revocation List (CRL) of the CA should be 
Hallvard Furuseth's avatar
Hallvard Furuseth committed
332
used to verify if the server certificates have not been revoked. This
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
requires
.B TLS_CACERTDIR
parameter to be set.
.B <level>
can be specified as one of the following keywords:
.RS
.TP
.B none
No CRL checks are performed
.TP
.B peer
Check the CRL of the peer certificate
.TP
.B all
Check the CRL for a whole certificate chain
.RE
349
350
351
352
353
354
355
356
357
358
359
360
361
.SH "ENVIRONMENT VARIABLES"
.TP
LDAPNOINIT
disable all defaulting
.TP
LDAPCONF
path of a configuration file
.TP
LDAPRC
basename of ldaprc file in $HOME or $CWD
.TP
LDAP<option-name>
Set <option-name> as from ldap.conf
Kurt Zeilenga's avatar
Kurt Zeilenga committed
362
.SH FILES
363
.TP
Kurt Zeilenga's avatar
Kurt Zeilenga committed
364
.I  ETCDIR/ldap.conf
365
366
367
368
369
370
371
system-wide ldap configuration file
.TP
.I  $HOME/ldaprc, $HOME/.ldaprc
user ldap configuration file
.TP
.I  $CWD/ldaprc
local ldap configuration file
Kurt Zeilenga's avatar
Kurt Zeilenga committed
372
.SH "SEE ALSO"
Hallvard Furuseth's avatar
Hallvard Furuseth committed
373
.BR ldap (3),
374
375
.BR ldap_set_option (3),
.BR ldap_result (3),
Hallvard Furuseth's avatar
Hallvard Furuseth committed
376
377
.BR openssl (1),
.BR sasl (3)
Kurt Zeilenga's avatar
Kurt Zeilenga committed
378
379
380
.SH AUTHOR
Kurt Zeilenga, The OpenLDAP Project
.SH ACKNOWLEDGEMENTS
Kurt Zeilenga's avatar
Kurt Zeilenga committed
381
.so ../Project