1 .TH LDAP.CONF 5 "RELEASEDATE" "OpenLDAP LDVERSION"
3 .\" Copyright 1998-2009 The OpenLDAP Foundation All Rights Reserved.
4 .\" Copying restrictions apply. See COPYRIGHT/LICENSE.
6 ldap.conf, .ldaprc \- LDAP configuration file/environment variables
8 ETCDIR/ldap.conf, ldaprc, .ldaprc, $LDAP<option-name>
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 Thus the following files and variables are read, in order:
51 variable $LDAPNOINIT, and if that is not set:
52 system file ETCDIR/ldap.conf,
53 user files $HOME/ldaprc, $HOME/.ldaprc, ./ldaprc,
54 system file $LDAPCONF,
55 user files $HOME/$LDAPRC, $HOME/.$LDAPRC, ./$LDAPRC,
56 variables $LDAP<option-name>.
58 Settings late in the list override earlier ones.
60 The configuration options are case-insensitive;
61 their value, on a case by case basis, may be case-sensitive.
63 Blank lines and lines beginning with a hash mark (`#')
64 are ignored up to their end.
66 Valid lines are made of an option's name (a sequence of non-blanks,
67 conventionally written in uppercase, although not required),
69 The value starts with the first non-blank character after
70 the option's name, and terminates at the end of the line,
71 or at the last sequence of blanks before the end of the line.
72 The tokenization of the value, if any, is delegated to the handler(s)
73 for that option, if any. Quoting values that contain blanks
74 may be incorrect, as the quotes would become part of the value.
77 URI "ldap:// ldaps://"
83 is correct (note the absence of the double quotes).
85 A line cannot be longer than LINE_MAX, which should be more than 2000 bytes
87 There is no mechanism to split a long line on multiple lines, either for
88 beautification or to overcome the above limit.
90 The different configuration options are:
92 .B URI <ldap[si]://[name[:port]] ...>
93 Specifies the URI(s) of an LDAP server(s) to which the
95 library should connect. The URI scheme may be any of
100 which refer to LDAP over TCP, LDAP over SSL (TLS) and LDAP
101 over IPC (UNIX domain sockets), respectively.
102 Each server's name can be specified as a
103 domain-style name or an IP address literal. Optionally, the
104 server's name can followed by a ':' and the port number the LDAP
105 server is listening on. If no port number is provided, the default
106 port for the scheme is used (389 for ldap://, 636 for ldaps://).
109 is the name of the socket, and no
111 is required, nor allowed; note that directory separators must be
112 URL-encoded, like any other characters that are special to URLs;
119 ldapi://%2Fusr%2Flocal%2Fvar%2Fldapi
121 A space separated list of URIs may be provided.
124 Specifies the default base DN to use when performing ldap operations.
125 The base must be specified as a Distinguished Name in LDAP format.
128 Specifies the default bind DN to use when performing ldap operations.
129 The bind DN must be specified as a Distinguished Name in LDAP format.
130 .B This is a user-only option.
133 Specifies how alias dereferencing is done when performing a search. The
135 can be specified as one of the following keywords:
139 Aliases are never dereferenced. This is the default.
142 Aliases are dereferenced in subordinates of the base object, but
143 not in locating the base object of the search.
146 Aliases are only dereferenced when locating the base object of the search.
149 Aliases are dereferenced both in searching and in locating the base object
154 .B HOST <name[:port] ...>
155 Specifies the name(s) of an LDAP server(s) to which the
157 library should connect. Each server's name can be specified as a
158 domain-style name or an IP address and optionally followed by a ':' and
159 the port number the ldap server is listening on. A space separated
160 list of hosts may be provided.
162 is deprecated in favor of
165 .B NETWORK_TIMEOUT <integer>
166 Specifies the timeout (in seconds) after which the poll(2)/select(2)
167 following a connect(2) returns in case of no activity.
170 Specifies the default port used when connecting to LDAP servers(s).
171 The port may be specified as a number.
173 is deprecated in favor of
176 .B REFERRALS <on/true/yes/off/false/no>
177 Specifies if the client should automatically follow referrals returned
180 Note that the command line tools
182 &co always override this option.
183 .\" This should only be allowed via ldap_set_option(3)
185 .\".B RESTART <on/true/yes/off/false/no>
186 .\"Determines whether the library should implicitly restart connections (FIXME).
188 .B SIZELIMIT <integer>
189 Specifies a size limit (number of entries) to use when performing searches.
190 The number should be a non-negative integer. \fISIZELIMIT\fP of zero (0)
191 specifies a request for unlimited search size. Please note that the server
192 may still apply any server-side limit on the amount of entries that can be
193 returned by a search operation.
195 .B TIMELIMIT <integer>
196 Specifies a time limit (in seconds) to use when performing searches.
197 The number should be a non-negative integer. \fITIMELIMIT\fP of zero (0)
198 specifies unlimited search time to be used. Please note that the server
199 may still apply any server-side limit on the duration of a search operation.
201 Specifies what version of the LDAP protocol should be used.
204 Specifies a timeout (in seconds) after which calls to synchronous LDAP
205 APIs will abort if no response is received. Also used for any
207 calls where a NULL timeout parameter is supplied.
209 If OpenLDAP is built with Simple Authentication and Security Layer support,
210 there are more options you can specify.
212 .B SASL_MECH <mechanism>
213 Specifies the SASL mechanism to use.
214 .B This is a user-only option.
216 .B SASL_REALM <realm>
217 Specifies the SASL realm.
218 .B This is a user-only option.
220 .B SASL_AUTHCID <authcid>
221 Specifies the authentication identity.
222 .B This is a user-only option.
224 .B SASL_AUTHZID <authcid>
225 Specifies the proxy authorization identity.
226 .B This is a user-only option.
228 .B SASL_SECPROPS <properties>
229 Specifies Cyrus SASL security properties. The
231 can be specified as a comma-separated list of the following:
235 (without any other properties) causes the properties
236 defaults ("noanonymous,noplain") to be cleared.
239 disables mechanisms susceptible to simple passive attacks.
242 disables mechanisms susceptible to active attacks.
245 disables mechanisms susceptible to passive dictionary attacks.
248 disables mechanisms which support anonymous login.
251 requires forward secrecy between sessions.
254 requires mechanisms which pass client credentials (and allows
255 mechanisms which can pass credentials to do so).
258 specifies the minimum acceptable
259 .I security strength factor
260 as an integer approximating the effective key length used for
261 encryption. 0 (zero) implies no protection, 1 implies integrity
262 protection only, 56 allows DES or other weak ciphers, 112
263 allows triple DES and other strong ciphers, 128 allows RC4,
264 Blowfish and other modern strong ciphers. The default is 0.
267 specifies the maximum acceptable
268 .I security strength factor
271 description). The default is
274 .B maxbufsize=<factor>
275 specifies the maximum security layer receive buffer
276 size allowed. 0 disables security layers. The default is 65536.
279 If OpenLDAP is built with Generic Security Services Application Programming Interface support,
280 there are more options you can specify.
282 .B GSSAPI_SIGN <on/true/yes/off/false/no>
283 Specifies if GSSAPI signing (GSS_C_INTEG_FLAG) should be used.
286 .B GSSAPI_ENCRYPT <on/true/yes/off/false/no>
287 Specifies if GSSAPI encryption (GSS_C_INTEG_FLAG and GSS_C_CONF_FLAG)
288 should be used. The default is off.
290 .B GSSAPI_ALLOW_REMOTE_PRINCIPAL <on/true/yes/off/false/no>
291 Specifies if GSSAPI based authentification should try to form the
292 target principal name out of the ldapServiceName or dnsHostName
293 attribute of the targets RootDSE entry. The default is off.
295 If OpenLDAP is built with Transport Layer Security support, there
296 are more options you can specify. These options are used when an
298 is selected (by default or otherwise) or when the application
299 negotiates TLS by issuing the LDAP StartTLS operation.
301 .B TLS_CACERT <filename>
302 Specifies the file that contains certificates for all of the Certificate
303 Authorities the client will recognize.
305 .B TLS_CACERTDIR <path>
306 Specifies the path of a directory that contains Certificate Authority
307 certificates in separate individual files. The
309 is always used before
311 This parameter is ignored with GNUtls.
313 .B TLS_CERT <filename>
314 Specifies the file that contains the client certificate.
315 .B This is a user-only option.
317 .B TLS_KEY <filename>
318 Specifies the file that contains the private key that matches the certificate
321 file. Currently, the private key must not be protected with a password, so
322 it is of critical importance that the key file is protected carefully.
323 .B This is a user-only option.
325 .B TLS_CIPHER_SUITE <cipher-suite-spec>
326 Specifies acceptable cipher suite and preference order.
327 <cipher-suite-spec> should be a cipher specification for OpenSSL,
328 e.g., HIGH:MEDIUM:+SSLv2.
330 To check what ciphers a given spec selects, use:
333 openssl ciphers \-v <cipher-suite-spec>
336 To obtain the list of ciphers in GNUtls use:
342 .B TLS_RANDFILE <filename>
343 Specifies the file to obtain random bits from when /dev/[u]random is
344 not available. Generally set to the name of the EGD/PRNGD socket.
345 The environment variable RANDFILE can also be used to specify the filename.
346 This parameter is ignored with GNUtls.
348 .B TLS_REQCERT <level>
349 Specifies what checks to perform on server certificates in a TLS session,
352 can be specified as one of the following keywords:
356 The client will not request or check any server certificate.
359 The server certificate is requested. If no certificate is provided,
360 the session proceeds normally. If a bad certificate is provided, it will
361 be ignored and the session proceeds normally.
364 The server certificate is requested. If no certificate is provided,
365 the session proceeds normally. If a bad certificate is provided,
366 the session is immediately terminated.
369 These keywords are equivalent. The server certificate is requested. If no
370 certificate is provided, or a bad certificate is provided, the session
371 is immediately terminated. This is the default setting.
374 .B TLS_CRLCHECK <level>
375 Specifies if the Certificate Revocation List (CRL) of the CA should be
376 used to verify if the server certificates have not been revoked. This
379 parameter to be set. This parameter is ignored with GNUtls.
381 can be specified as one of the following keywords:
385 No CRL checks are performed
388 Check the CRL of the peer certificate
391 Check the CRL for a whole certificate chain
394 .B TLS_CRLFILE <filename>
395 Specifies the file containing a Certificate Revocation List to be used
396 to verify if the server certificates have not been revoked. This
397 parameter is only supported with GNUtls.
398 .SH "ENVIRONMENT VARIABLES"
401 disable all defaulting
404 path of a configuration file
407 basename of ldaprc file in $HOME or $CWD
410 Set <option-name> as from ldap.conf
414 system-wide ldap configuration file
416 .I $HOME/ldaprc, $HOME/.ldaprc
417 user ldap configuration file
420 local ldap configuration file
423 .BR ldap_set_option (3),
428 Kurt Zeilenga, The OpenLDAP Project