]> git.sur5r.net Git - openldap/blob - doc/man/man5/ldap.conf.5
improve previous commit (ITS#5614)
[openldap] / doc / man / man5 / ldap.conf.5
1 .TH LDAP.CONF 5 "RELEASEDATE" "OpenLDAP LDVERSION"
2 .\" $OpenLDAP$
3 .\" Copyright 1998-2008 The OpenLDAP Foundation All Rights Reserved.
4 .\" Copying restrictions apply.  See COPYRIGHT/LICENSE.
5 .SH NAME
6 ldap.conf, .ldaprc \- ldap configuration file
7 .SH SYNOPSIS
8 ETCDIR/ldap.conf, .ldaprc
9 .SH DESCRIPTION
10 If the environment variable \fBLDAPNOINIT\fP is defined, all
11 defaulting is disabled.
12 .LP
13 The
14 .I ldap.conf
15 configuration file is used to set system-wide defaults to be applied when
16 running
17 .I ldap
18 clients.
19 .LP
20 Users may create an optional configuration file,
21 .I ldaprc
22 or
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 Additional configuration files can be specified using
32 the \fBLDAPCONF\fP and \fBLDAPRC\fP environment variables.
33 \fBLDAPCONF\fP may be set to the path of a configuration file.  This
34 path can be absolute or relative to the current working directory.
35 The \fBLDAPRC\fP, if defined, should be the basename of a file
36 in the current working directory or in the user's home directory.
37 .LP
38 Environmental variables may also be used to augment the file based defaults.
39 The name of the variable is the option name with an added prefix of \fBLDAP\fP.
40 For example, to define \fBBASE\fP via the environment, set the variable
41 \fBLDAPBASE\fP to the desired value.
42 .LP
43 Some options are user\-only.  Such options are ignored if present
44 in the
45 .I ldap.conf
46 (or file specified by
47 .BR LDAPCONF ).
48 .SH OPTIONS
49 The configuration options are case-insensitive;
50 their value, on a case by case basis, may be case-sensitive.
51 .LP
52 Blank lines and lines beginning with a hash mark (`#')
53 are ignored up to their end.
54 .LP
55 Valid lines are made of an option's name (a sequence of non-blanks,
56 conventionally written in uppercase, although not required), 
57 followed by a value.
58 The value starts with the first non-blank character after 
59 the option's name, and terminates at the end of the line, 
60 or at the last sequence of blanks before the end of the line.
61 The tokenization of the value, if any, is delegated to the handler(s)
62 for that option, if any.  Quoting values that contain blanks 
63 may be incorrect, as the quotes would become part of the value.
64 For example,
65
66         URI     "ldap:// ldaps://"
67
68 is incorrect, while
69
70         URI     ldap:// ldaps://
71
72 is correct (note the absence of the double quotes).
73 .LP
74 A line cannot be longer than LINE_MAX, which should be more than 2000 bytes
75 on all platforms.
76 There is no mechanism to split a long line on multiple lines, either for
77 beautification or to overcome the above limit.
78 .LP
79 The different configuration options are:
80 .TP
81 .B URI <ldap[si]://[name[:port]] ...>
82 Specifies the URI(s) of an LDAP server(s) to which the
83 .I LDAP 
84 library should connect.  The URI scheme may be any of
85 .BR ldap ,
86 .B ldaps 
87 or
88 .BR ldapi ,
89 which refer to LDAP over TCP, LDAP over SSL (TLS) and LDAP
90 over IPC (UNIX domain sockets), respectively.
91 Each server's name can be specified as a
92 domain-style name or an IP address literal.  Optionally, the
93 server's name can followed by a ':' and the port number the LDAP
94 server is listening on.  If no port number is provided, the default
95 port for the scheme is used (389 for ldap://, 636 for ldaps://).
96 For LDAP over IPC,
97 .B name 
98 is the name of the socket, and no
99 .B port
100 is required, nor allowed; note that directory separators must be 
101 URL-encoded, like any other characters that are special to URLs; 
102 so the socket
103
104         /usr/local/var/ldapi
105
106 must be specified as
107
108         ldapi://%2Fusr%2Flocal%2Fvar%2Fldapi
109
110 A space separated list of URIs may be provided.
111 .TP
112 .B BASE <base>
113 Specifies the default base DN to use when performing ldap operations.
114 The base must be specified as a Distinguished Name in LDAP format.
115 .TP
116 .B BINDDN <dn>
117 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 .B DEREF <when>
122 Specifies how alias dereferencing is done when performing a search. The
123 .B <when>
124 can be specified as one of the following keywords:
125 .RS
126 .TP
127 .B never
128 Aliases are never dereferenced. This is the default.
129 .TP
130 .B searching
131 Aliases are dereferenced in subordinates of the base object, but
132 not in locating the base object of the search.
133 .TP
134 .B finding
135 Aliases are only dereferenced when locating the base object of the search.
136 .TP
137 .B always
138 Aliases are dereferenced both in searching and in locating the base object
139 of the search.
140 .RE
141 .TP
142 .TP
143 .B HOST <name[:port] ...>
144 Specifies the name(s) of an LDAP server(s) to which the
145 .I LDAP 
146 library should connect.  Each server's name can be specified as a
147 domain-style name or an IP address and optionally followed by a ':' and
148 the port number the ldap server is listening on.  A space separated
149 list of hosts may be provided.
150 .B HOST
151 is deprecated in favor of
152 .BR URI .
153 .TP
154 .B NETWORK_TIMEOUT <integer>
155 Specifies the timeout (in seconds) after which the poll(2)/select(2)
156 following a connect(2) returns in case of no activity.
157 .TP
158 .B PORT <port>
159 Specifies the default port used when connecting to LDAP servers(s).
160 The port may be specified as a number.
161 .B PORT
162 is deprecated in favor of
163 .BR URI.
164 .TP
165 .B REFERRALS <on/true/yes/off/false/no>
166 Specifies if the client should automatically follow referrals returned
167 by LDAP servers.
168 The default is on.
169 Note that the command line tools
170 .BR ldapsearch (1)
171 &co always override this option.
172 .\" This should only be allowed via ldap_set_option(3)
173 .\".TP
174 .\".B RESTART <on/true/yes/off/false/no>
175 .\"Determines whether the library should implicitly restart connections (FIXME).
176 .TP
177 .B SIZELIMIT <integer>
178 Specifies a size limit to use when performing searches.  The
179 number should be a non-negative integer.  \fISIZELIMIT\fP of zero (0)
180 specifies unlimited search size.
181 .TP
182 .B TIMELIMIT <integer>
183 Specifies a time limit to use when performing searches.  The
184 number should be a non-negative integer.  \fITIMELIMIT\fP of zero (0)
185 specifies unlimited search time to be used.
186 .B VERSION {2|3}
187 Specifies what version of the LDAP protocol should be used.
188 .TP
189 .B TIMEOUT <integer>
190 Specifies a timeout (in seconds) after which calls to synchronous LDAP
191 APIs will abort if no response is received.  Also used for any
192 .BR ldap_result (3)
193 calls where a NULL timeout parameter is supplied.
194 .SH SASL OPTIONS
195 If OpenLDAP is built with Simple Authentication and Security Layer support,
196 there are more options you can specify.
197 .TP
198 .B SASL_MECH <mechanism>
199 Specifies the SASL mechanism to use.
200 .B This is a user\-only option.
201 .TP
202 .B SASL_REALM <realm>
203 Specifies the SASL realm.
204 .B This is a user\-only option.
205 .TP
206 .B SASL_AUTHCID <authcid>
207 Specifies the authentication identity.
208 .B This is a user\-only option.
209 .TP
210 .B SASL_AUTHZID <authcid>
211 Specifies the proxy authorization identity.
212 .B This is a user\-only option.
213 .TP
214 .B SASL_SECPROPS <properties>
215 Specifies Cyrus SASL security properties. The 
216 .B <properties>
217 can be specified as a comma-separated list of the following:
218 .RS
219 .TP
220 .B none
221 (without any other properties) causes the properties
222 defaults ("noanonymous,noplain") to be cleared.
223 .TP
224 .B noplain
225 disables mechanisms susceptible to simple passive attacks.
226 .TP
227 .B noactive
228 disables mechanisms susceptible to active attacks.
229 .TP
230 .B nodict
231 disables mechanisms susceptible to passive dictionary attacks.
232 .TP
233 .B noanonymous
234 disables mechanisms which support anonymous login.
235 .TP
236 .B forwardsec
237 requires forward secrecy between sessions.
238 .TP
239 .B passcred
240 requires mechanisms which pass client credentials (and allows
241 mechanisms which can pass credentials to do so).
242 .TP
243 .B minssf=<factor> 
244 specifies the minimum acceptable
245 .I security strength factor
246 as an integer approximating the effective key length used for
247 encryption.  0 (zero) implies no protection, 1 implies integrity
248 protection only, 56 allows DES or other weak ciphers, 112
249 allows triple DES and other strong ciphers, 128 allows RC4,
250 Blowfish and other modern strong ciphers.  The default is 0.
251 .TP
252 .B maxssf=<factor> 
253 specifies the maximum acceptable
254 .I security strength factor
255 as an integer (see
256 .B minssf
257 description).  The default is
258 .BR INT_MAX .
259 .TP
260 .B maxbufsize=<factor> 
261 specifies the maximum security layer receive buffer
262 size allowed.  0 disables security layers.  The default is 65536.
263 .RE
264 .SH TLS OPTIONS
265 If OpenLDAP is built with Transport Layer Security support, there
266 are more options you can specify.  These options are used when an
267 .B ldaps:// URI
268 is selected (by default or otherwise) or when the application
269 negotiates TLS by issuing the LDAP StartTLS operation.
270 .TP
271 .B TLS_CACERT <filename>
272 Specifies the file that contains certificates for all of the Certificate
273 Authorities the client will recognize.
274 .TP
275 .B TLS_CACERTDIR <path>
276 Specifies the path of a directory that contains Certificate Authority
277 certificates in separate individual files. The
278 .B TLS_CACERT
279 is always used before
280 .B TLS_CACERTDIR.
281 This parameter is ignored with GNUtls.
282 .TP
283 .B TLS_CERT <filename>
284 Specifies the file that contains the client certificate.
285 .B This is a user\-only option.
286 .TP
287 .B TLS_KEY <filename>
288 Specifies the file that contains the private key that matches the certificate
289 stored in the
290 .B TLS_CERT
291 file. Currently, the private key must not be protected with a password, so
292 it is of critical importance that the key file is protected carefully.
293 .B This is a user\-only option.
294 .TP
295 .B TLS_CIPHER_SUITE <cipher-suite-spec>
296 Specifies acceptable cipher suite and preference order.
297 <cipher-suite-spec> should be a cipher specification for OpenSSL,
298 e.g., HIGH:MEDIUM:+SSLv2.
299 .TP
300 .B TLS_RANDFILE <filename>
301 Specifies the file to obtain random bits from when /dev/[u]random is
302 not available. Generally set to the name of the EGD/PRNGD socket.
303 The environment variable RANDFILE can also be used to specify the filename.
304 This parameter is ignored with GNUtls.
305 .TP
306 .B TLS_REQCERT <level>
307 Specifies what checks to perform on server certificates in a TLS session,
308 if any. The
309 .B <level>
310 can be specified as one of the following keywords:
311 .RS
312 .TP
313 .B never
314 The client will not request or check any server certificate.
315 .TP
316 .B allow
317 The server certificate is requested. If no certificate is provided,
318 the session proceeds normally. If a bad certificate is provided, it will
319 be ignored and the session proceeds normally.
320 .TP
321 .B try
322 The server certificate is requested. If no certificate is provided,
323 the session proceeds normally. If a bad certificate is provided,
324 the session is immediately terminated.
325 .TP
326 .B demand | hard
327 These keywords are equivalent. The server certificate is requested. If no
328 certificate is provided, or a bad certificate is provided, the session
329 is immediately terminated. This is the default setting.
330 .RE
331 .TP
332 .B TLS_CRLCHECK <level>
333 Specifies if the Certificate Revocation List (CRL) of the CA should be 
334 used to verify if the server certificates have not been revoked. This
335 requires
336 .B TLS_CACERTDIR
337 parameter to be set. This parameter is ignored with GNUtls.
338 .B <level>
339 can be specified as one of the following keywords:
340 .RS
341 .TP
342 .B none
343 No CRL checks are performed
344 .TP
345 .B peer
346 Check the CRL of the peer certificate
347 .TP
348 .B all
349 Check the CRL for a whole certificate chain
350 .RE
351 .TP
352 .B TLS_CRLFILE <filename>
353 Specifies the file containing a Certificate Revocation List to be used
354 to verify if the server certificates have not been revoked. This
355 parameter is only supported with GNUtls.
356 .SH "ENVIRONMENT VARIABLES"
357 .TP
358 LDAPNOINIT
359 disable all defaulting
360 .TP
361 LDAPCONF
362 path of a configuration file
363 .TP
364 LDAPRC
365 basename of ldaprc file in $HOME or $CWD
366 .TP
367 LDAP<option-name>
368 Set <option-name> as from ldap.conf
369 .SH FILES
370 .TP
371 .I  ETCDIR/ldap.conf
372 system-wide ldap configuration file
373 .TP
374 .I  $HOME/ldaprc, $HOME/.ldaprc
375 user ldap configuration file
376 .TP
377 .I  $CWD/ldaprc
378 local ldap configuration file
379 .SH "SEE ALSO"
380 .BR ldap (3),
381 .BR ldap_set_option (3),
382 .BR ldap_result (3),
383 .BR openssl (1),
384 .BR sasl (3)
385 .SH AUTHOR
386 Kurt Zeilenga, The OpenLDAP Project
387 .SH ACKNOWLEDGEMENTS
388 .so ../Project