1 .TH LDAP.CONF 5 "RELEASEDATE" "OpenLDAP LDVERSION"
3 .\" Copyright 1998-2006 The OpenLDAP Foundation All Rights Reserved.
4 .\" Copying restrictions apply. See COPYRIGHT/LICENSE.
7 ldap.conf, .ldaprc \- ldap configuration file
9 ETCDIR/ldap.conf, .ldaprc
11 If the environment variable \fBLDAPNOINIT\fP is defined, all
12 defaulting is disabled.
16 configuration file is used to set system-wide defaults to be applied when
21 Users may create an optional configuration file,
25 in their home directory which will be used to override the system-wide
29 in the current working directory is also used.
32 Additional configuration files can be specified using
33 the \fBLDAPCONF\fP and \fBLDAPRC\fP environment variables.
34 \fBLDAPCONF\fP may be set to the path of a configuration file. This
35 path can be absolute or relative to the current working directory.
36 The \fBLDAPRC\fP, if defined, should be the basename of a file
37 in the current working directory or in the user's home directory.
39 Environmental variables may also be used to augment the file based defaults.
40 The name of the variable is the option name with an added prefix of \fBLDAP\fP.
41 For example, to define \fBBASE\fP via the environment, set the variable
42 \fBLDAPBASE\fP to the desired value.
44 Some options are user\-only. Such options are ignored if present
50 The configuration options are case-insensitive;
51 their value, on a case by case basis, may be case-sensitive.
53 Blank lines and lines beginning with a hash mark (`#')
54 are ignored up to their end.
56 Valid lines are made of an option's name (a sequence of non-blanks,
57 conventionally written in uppercase, although not required),
59 The value starts with the first non-blank character after
60 the option's name, and terminates at the end of the line,
61 or at the last sequence of blanks before the end of the line.
62 The tokenization of the value, if any, is delegated to the handler(s)
63 for that option, if any. Quoting values that contain blanks
64 may be incorrect, as the quotes would become part of the value.
67 URI "ldap:// ldaps://"
73 is correct (note the absence of the double quotes).
75 A line cannot be longer than LINE_MAX, which should be more than 2000 bytes
77 There is no mechanism to split a long line on multiple lines, either for
78 beautification or to overcome the above limit.
80 The different configuration options are:
82 .B URI <ldap[si]://[name[:port]] ...>
83 Specifies the URI(s) of an LDAP server(s) to which the
85 library should connect. The URI scheme may be any of
90 which refer to LDAP over TCP, LDAP over SSL (TLS) and LDAP
91 over IPC (UNIX domain sockets), respectively.
92 Each server's name can be specified as a
93 domain-style name or an IP address literal. Optionally, the
94 server's name can followed by a ':' and the port number the LDAP
95 server is listening on. If no port number is provided, the default
96 port for the scheme is used (389 for ldap://, 636 for ldaps://).
99 is the name of the socket, and no
101 is required, nor allowed; note that directory separators must be
102 URL-encoded, like any other characters that are special to URLs;
109 ldapi://%2Fusr%2Flocal%2Fvar%2Fldapi
111 A space separated list of URIs may be provided.
114 Specifies the default base DN to use when performing ldap operations.
115 The base must be specified as a Distinguished Name in LDAP format.
118 Specifies the default bind DN to use when performing ldap operations.
119 The bind DN must be specified as a Distinguished Name in LDAP format.
120 .B This is a user\-only option.
122 .B HOST <name[:port] ...>
123 Specifies the name(s) of an LDAP server(s) to which the
125 library should connect. Each server's name can be specified as a
126 domain-style name or an IP address and optionally followed by a ':' and
127 the port number the ldap server is listening on. A space separated
128 list of hosts may be provided.
130 is deprecated in favor of
134 Specifies the default port used when connecting to LDAP servers(s).
135 The port may be specified as a number.
137 is deprecated in favor of
140 .B REFERRALS <on/true/yes/off/false/no>
141 Specifies if the client should automatically follow referrals returned
144 Note that the command line tools
146 &co always override this option.
148 .B SIZELIMIT <integer>
149 Specifies a size limit to use when performing searches. The
150 number should be a non-negative integer. \fISIZELIMIT\fP of zero (0)
151 specifies unlimited search size.
153 .B TIMELIMIT <integer>
154 Specifies a time limit to use when performing searches. The
155 number should be a non-negative integer. \fITIMELIMIT\fP of zero (0)
156 specifies unlimited search time to be used.
159 Specifies how alias dereferencing is done when performing a search. The
161 can be specified as one of the following keywords:
165 Aliases are never dereferenced. This is the default.
168 Aliases are dereferenced in subordinates of the base object, but
169 not in locating the base object of the search.
172 Aliases are only dereferenced when locating the base object of the search.
175 Aliases are dereferenced both in searching and in locating the base object
180 Specifies what version of the LDAP protocol should be used.
183 Specifies a generic timeout (in seconds). Currently ignored.
185 .B NETWORK_TIMEOUT <integer>
186 Specifies the timeout (in seconds) after which the poll(2)/select(2)
187 following a connect(2) returns in case of no activity.
189 If OpenLDAP is built with Simple Authentication and Security Layer support,
190 there are more options you can specify.
192 .B SASL_MECH <mechanism>
193 Specifies the SASL mechanism to use.
194 .B This is a user\-only option.
196 .B SASL_REALM <realm>
197 Specifies the SASL realm.
198 .B This is a user\-only option.
200 .B SASL_AUTHCID <authcid>
201 Specifies the authentication identity.
202 .B This is a user\-only option.
204 .B SASL_AUTHZID <authcid>
205 Specifies the proxy authorization identity.
206 .B This is a user\-only option.
208 .B SASL_SECPROPS <properties>
209 Specifies Cyrus SASL security properties. The
211 can be specified as a comma-separated list of the following:
215 (without any other properties) causes the properties
216 defaults ("noanonymous,noplain") to be cleared.
219 disables mechanisms susceptible to simple passive attacks.
222 disables mechanisms susceptible to active attacks.
225 disables mechanisms susceptible to passive dictionary attacks.
228 disables mechanisms which support anonymous login.
231 requires forward secrecy between sessions.
234 requires mechanisms which pass client credentials (and allows
235 mechanisms which can pass credentials to do so).
238 specifies the minimum acceptable
239 .I security strength factor
240 as an integer approximating the effective key length used for
241 encryption. 0 (zero) implies no protection, 1 implies integrity
242 protection only, 56 allows DES or other weak ciphers, 112
243 allows triple DES and other strong ciphers, 128 allows RC4,
244 Blowfish and other modern strong ciphers. The default is 0.
247 specifies the maximum acceptable
248 .I security strength factor
251 description). The default is
254 .B maxbufsize=<factor>
255 specifies the maximum security layer receive buffer
256 size allowed. 0 disables security layers. The default is 65536.
259 If OpenLDAP is built with Transport Layer Security support, there
260 are more options you can specify. These options are used when an
262 is selected (by default or otherwise) or when the application
263 negotiates TLS by issuing the LDAP StartTLS operation.
265 .B TLS_CACERT <filename>
266 Specifies the file that contains certificates for all of the Certificate
267 Authorities the client will recognize.
269 .B TLS_CACERTDIR <path>
270 Specifies the path of a directory that contains Certificate Authority
271 certificates in separate individual files. The
273 is always used before
276 .B TLS_CERT <filename>
277 Specifies the file that contains the client certificate.
278 .B This is a user\-only option.
280 .B TLS_KEY <filename>
281 Specifies the file that contains the private key that matches the certificate
284 file. Currently, the private key must not be protected with a password, so
285 it is of critical importance that the key file is protected carefully.
286 .B This is a user\-only option.
288 .B TLS_CIPHER_SUITE <cipher-suite-spec>
289 Specifies acceptable cipher suite and preference order.
290 <cipher-suite-spec> should be a cipher specification for OpenSSL,
291 e.g., HIGH:MEDIUM:+SSLv2.
293 .B TLS_RANDFILE <filename>
294 Specifies the file to obtain random bits from when /dev/[u]random is
295 not available. Generally set to the name of the EGD/PRNGD socket.
296 The environment variable RANDFILE can also be used to specify the filename.
298 .B TLS_REQCERT <level>
299 Specifies what checks to perform on server certificates in a TLS session,
302 can be specified as one of the following keywords:
306 The client will not request or check any server certificate.
309 The server certificate is requested. If no certificate is provided,
310 the session proceeds normally. If a bad certificate is provided, it will
311 be ignored and the session proceeds normally.
314 The server certificate is requested. If no certificate is provided,
315 the session proceeds normally. If a bad certificate is provided,
316 the session is immediately terminated.
319 These keywords are equivalent. The server certificate is requested. If no
320 certificate is provided, or a bad certificate is provided, the session
321 is immediately terminated. This is the default setting.
324 .B TLS_CRLCHECK <level>
325 Specifies if the Certificate Revocation List (CRL) of the CA should be
326 used to verify if the server certificates have not been revoked. This
331 can be specified as one of the following keywords:
335 No CRL checks are performed
338 Check the CRL of the peer certificate
341 Check the CRL for a whole certificate chain
343 .SH "ENVIRONMENT VARIABLES"
346 disable all defaulting
349 path of a configuration file
352 basename of ldaprc file in $HOME or $CWD
355 Set <option-name> as from ldap.conf
359 system-wide ldap configuration file
361 .I $HOME/ldaprc, $HOME/.ldaprc
362 user ldap configuration file
365 local ldap configuration file
371 Kurt Zeilenga, The OpenLDAP Project
374 is developed and maintained by The OpenLDAP Project (http://www.openldap.org/).
376 is derived from University of Michigan LDAP 3.3 Release.