1 .TH LDAP.CONF 5 "2008/07/16" "OpenLDAP 2.4.11"
2 .\" $OpenLDAP: pkg/ldap/doc/man/man5/ldap.conf.5,v 1.33.2.6 2008/02/11 23:26:39 kurt Exp $
3 .\" Copyright 1998-2008 The OpenLDAP Foundation All Rights Reserved.
4 .\" Copying restrictions apply. See COPYRIGHT/LICENSE.
6 ldap.conf, .ldaprc \- ldap configuration file
8 /etc/openldap/ldap.conf, .ldaprc
10 If the environment variable \fBLDAPNOINIT\fP is defined, all
11 defaulting is disabled.
15 configuration file is used to set system-wide defaults to be applied when
20 Users may create an optional configuration file,
24 in their home directory which will be used to override the system-wide
28 in the current working directory is also used.
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.
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.
43 Some options are user\-only. Such options are ignored if present
49 The configuration options are case-insensitive;
50 their value, on a case by case basis, may be case-sensitive.
52 Blank lines and lines beginning with a hash mark (`#')
53 are ignored up to their end.
55 Valid lines are made of an option's name (a sequence of non-blanks,
56 conventionally written in uppercase, although not required),
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.
66 URI "ldap:// ldaps://"
72 is correct (note the absence of the double quotes).
74 A line cannot be longer than LINE_MAX, which should be more than 2000 bytes
76 There is no mechanism to split a long line on multiple lines, either for
77 beautification or to overcome the above limit.
79 The different configuration options are:
81 .B URI <ldap[si]://[name[:port]] ...>
82 Specifies the URI(s) of an LDAP server(s) to which the
84 library should connect. The URI scheme may be any of
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://).
98 is the name of the socket, and no
100 is required, nor allowed; note that directory separators must be
101 URL-encoded, like any other characters that are special to URLs;
108 ldapi://%2Fusr%2Flocal%2Fvar%2Fldapi
110 A space separated list of URIs may be provided.
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.
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.
122 Specifies how alias dereferencing is done when performing a search. The
124 can be specified as one of the following keywords:
128 Aliases are never dereferenced. This is the default.
131 Aliases are dereferenced in subordinates of the base object, but
132 not in locating the base object of the search.
135 Aliases are only dereferenced when locating the base object of the search.
138 Aliases are dereferenced both in searching and in locating the base object
142 .B HOST <name[:port] ...>
143 Specifies the name(s) of an LDAP server(s) to which the
145 library should connect. Each server's name can be specified as a
146 domain-style name or an IP address and optionally followed by a ':' and
147 the port number the ldap server is listening on. A space separated
148 list of hosts may be provided.
150 is deprecated in favor of
153 .B NETWORK_TIMEOUT <integer>
154 Specifies the timeout (in seconds) after which the poll(2)/select(2)
155 following a connect(2) returns in case of no activity.
158 Specifies the default port used when connecting to LDAP servers(s).
159 The port may be specified as a number.
161 is deprecated in favor of
164 .B REFERRALS <on/true/yes/off/false/no>
165 Specifies if the client should automatically follow referrals returned
168 Note that the command line tools
170 &co always override this option.
171 .\" This should only be allowed via ldap_set_option(3)
173 .\".B RESTART <on/true/yes/off/false/no>
174 .\"Determines whether the library should implicitly restart connections (FIXME).
176 .B SIZELIMIT <integer>
177 Specifies a size limit to use when performing searches. The
178 number should be a non-negative integer. \fISIZELIMIT\fP of zero (0)
179 specifies unlimited search size.
181 .B TIMELIMIT <integer>
182 Specifies a time limit to use when performing searches. The
183 number should be a non-negative integer. \fITIMELIMIT\fP of zero (0)
184 specifies unlimited search time to be used.
186 Specifies what version of the LDAP protocol should be used.
189 Specifies a timeout (in seconds) after which calls to synchronous LDAP
190 APIs will abort if no response is received. Also used for any
192 calls where a NULL timeout parameter is supplied.
194 If OpenLDAP is built with Simple Authentication and Security Layer support,
195 there are more options you can specify.
197 .B SASL_MECH <mechanism>
198 Specifies the SASL mechanism to use.
199 .B This is a user\-only option.
201 .B SASL_REALM <realm>
202 Specifies the SASL realm.
203 .B This is a user\-only option.
205 .B SASL_AUTHCID <authcid>
206 Specifies the authentication identity.
207 .B This is a user\-only option.
209 .B SASL_AUTHZID <authcid>
210 Specifies the proxy authorization identity.
211 .B This is a user\-only option.
213 .B SASL_SECPROPS <properties>
214 Specifies Cyrus SASL security properties. The
216 can be specified as a comma-separated list of the following:
220 (without any other properties) causes the properties
221 defaults ("noanonymous,noplain") to be cleared.
224 disables mechanisms susceptible to simple passive attacks.
227 disables mechanisms susceptible to active attacks.
230 disables mechanisms susceptible to passive dictionary attacks.
233 disables mechanisms which support anonymous login.
236 requires forward secrecy between sessions.
239 requires mechanisms which pass client credentials (and allows
240 mechanisms which can pass credentials to do so).
243 specifies the minimum acceptable
244 .I security strength factor
245 as an integer approximating the effective key length used for
246 encryption. 0 (zero) implies no protection, 1 implies integrity
247 protection only, 56 allows DES or other weak ciphers, 112
248 allows triple DES and other strong ciphers, 128 allows RC4,
249 Blowfish and other modern strong ciphers. The default is 0.
252 specifies the maximum acceptable
253 .I security strength factor
256 description). The default is
259 .B maxbufsize=<factor>
260 specifies the maximum security layer receive buffer
261 size allowed. 0 disables security layers. The default is 65536.
264 If OpenLDAP is built with Transport Layer Security support, there
265 are more options you can specify. These options are used when an
267 is selected (by default or otherwise) or when the application
268 negotiates TLS by issuing the LDAP StartTLS operation.
270 .B TLS_CACERT <filename>
271 Specifies the file that contains certificates for all of the Certificate
272 Authorities the client will recognize.
274 .B TLS_CACERTDIR <path>
275 Specifies the path of a directory that contains Certificate Authority
276 certificates in separate individual files. The
278 is always used before
280 This parameter is ignored with GNUtls.
282 .B TLS_CERT <filename>
283 Specifies the file that contains the client certificate.
284 .B This is a user\-only option.
286 .B TLS_KEY <filename>
287 Specifies the file that contains the private key that matches the certificate
290 file. Currently, the private key must not be protected with a password, so
291 it is of critical importance that the key file is protected carefully.
292 .B This is a user\-only option.
294 .B TLS_CIPHER_SUITE <cipher-suite-spec>
295 Specifies acceptable cipher suite and preference order.
296 <cipher-suite-spec> should be a cipher specification for OpenSSL,
297 e.g., HIGH:MEDIUM:+SSLv2.
299 .B TLS_RANDFILE <filename>
300 Specifies the file to obtain random bits from when /dev/[u]random is
301 not available. Generally set to the name of the EGD/PRNGD socket.
302 The environment variable RANDFILE can also be used to specify the filename.
303 This parameter is ignored with GNUtls.
305 .B TLS_REQCERT <level>
306 Specifies what checks to perform on server certificates in a TLS session,
309 can be specified as one of the following keywords:
313 The client will not request or check any server certificate.
316 The server certificate is requested. If no certificate is provided,
317 the session proceeds normally. If a bad certificate is provided, it will
318 be ignored and the session proceeds normally.
321 The server certificate is requested. If no certificate is provided,
322 the session proceeds normally. If a bad certificate is provided,
323 the session is immediately terminated.
326 These keywords are equivalent. The server certificate is requested. If no
327 certificate is provided, or a bad certificate is provided, the session
328 is immediately terminated. This is the default setting.
331 .B TLS_CRLCHECK <level>
332 Specifies if the Certificate Revocation List (CRL) of the CA should be
333 used to verify if the server certificates have not been revoked. This
336 parameter to be set. This parameter is ignored with GNUtls.
338 can be specified as one of the following keywords:
342 No CRL checks are performed
345 Check the CRL of the peer certificate
348 Check the CRL for a whole certificate chain
351 .B TLS_CRLFILE <filename>
352 Specifies the file containing a Certificate Revocation List to be used
353 to verify if the server certificates have not been revoked. This
354 parameter is only supported with GNUtls.
355 .SH "ENVIRONMENT VARIABLES"
358 disable all defaulting
361 path of a configuration file
364 basename of ldaprc file in $HOME or $CWD
367 Set <option-name> as from ldap.conf
370 .I /etc/openldap/ldap.conf
371 system-wide ldap configuration file
373 .I $HOME/ldaprc, $HOME/.ldaprc
374 user ldap configuration file
377 local ldap configuration file
380 .BR ldap_set_option (3),
385 Kurt Zeilenga, The OpenLDAP Project
387 .\" Shared Project Acknowledgement Text
388 .B "OpenLDAP Software"
389 is developed and maintained by The OpenLDAP Project <http://www.openldap.org/>.
390 .B "OpenLDAP Software"
391 is derived from University of Michigan LDAP 3.3 Release.