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