]> git.sur5r.net Git - openldap/blob - doc/man/man5/ldap.conf.5
4137200d402b7e5e2c32d1dae0d2e9e95719a17d
[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[s]://[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 either
86 .B ldap
87 or
88 .B ldaps 
89 which refer to LDAP over TCP and LDAP over SSL (TLS) respectively.
90 Each server's name can be specified as a
91 domain-style name or an IP address literal.  Optionally, the
92 server's name can followed by a ':' and the port number the LDAP
93 server is listening on.  If no port number is provided, the default
94 port for the scheme is used (389 for ldap://, 636 for ldaps://).
95 A space separated list of URIs may be provided.
96 .TP
97 .B BASE <base>
98 Specifies the default base DN to use when performing ldap operations.
99 The base must be specified as a Distinguished Name in LDAP format.
100 .TP
101 .B BINDDN <dn>
102 Specifies the default bind DN to use when performing ldap operations.
103 The bind DN must be specified as a Distinguished Name in LDAP format.
104 .B This is a user\-only option.
105 .TP
106 .B HOST <name[:port] ...>
107 Specifies the name(s) of an LDAP server(s) to which the
108 .I LDAP 
109 library should connect.  Each server's name can be specified as a
110 domain-style name or an IP address and optionally followed by a ':' and
111 the port number the ldap server is listening on.  A space separated
112 list of hosts may be provided.
113 .B HOST
114 is deprecated in favor of
115 .BR URI .
116 .TP
117 .B PORT <port>
118 Specifies the default port used when connecting to LDAP servers(s).
119 The port may be specified as a number.
120 .B PORT
121 is deprecated in favor of
122 .BR URI.
123 .TP
124 .B REFERRALS <on/true/yes/off/false/no>
125 Specifies if the client should automatically follow referrals returned
126 by LDAP servers.
127 The default is on.
128 Note that the command line tools
129 .BR ldapsearch (1)
130 &co always override this option.
131 .TP
132 .B SIZELIMIT <integer>
133 Specifies a size limit to use when performing searches.  The
134 number should be a non-negative integer.  \fISIZELIMIT\fP of zero (0)
135 specifies unlimited search size.
136 .TP
137 .B TIMELIMIT <integer>
138 Specifies a time limit to use when performing searches.  The
139 number should be a non-negative integer.  \fITIMELIMIT\fP of zero (0)
140 specifies unlimited search time to be used.
141 .TP
142 .B DEREF <when>
143 Specifies how alias dereferencing is done when performing a search. The
144 .B <when>
145 can be specified as one of the following keywords:
146 .RS
147 .TP
148 .B never
149 Aliases are never dereferenced. This is the default.
150 .TP
151 .B searching
152 Aliases are dereferenced in subordinates of the base object, but
153 not in locating the base object of the search.
154 .TP
155 .B finding
156 Aliases are only dereferenced when locating the base object of the search.
157 .TP
158 .B always
159 Aliases are dereferenced both in searching and in locating the base object
160 of the search.
161 .RE
162 .SH SASL OPTIONS
163 If OpenLDAP is built with Simple Authentication and Security Layer support,
164 there are more options you can specify.
165 .TP
166 .B SASL_MECH <mechanism>
167 Specifies the SASL mechanism to use.
168 .B This is a user\-only option.
169 .TP
170 .B SASL_REALM <realm>
171 Specifies the SASL realm.
172 .B This is a user\-only option.
173 .TP
174 .B SASL_AUTHCID <authcid>
175 Specifies the authentication identity.
176 .B This is a user\-only option.
177 .TP
178 .B SASL_AUTHZID <authcid>
179 Specifies the proxy authorization identity.
180 .B This is a user\-only option.
181 .TP
182 .B SASL_SECPROPS <properties>
183 Specifies Cyrus SASL security properties. The 
184 .B <properties>
185 can be specified as a comma-separated list of the following:
186 .RS
187 .TP
188 .B none
189 (without any other properties) causes the properties
190 defaults ("noanonymous,noplain") to be cleared.
191 .TP
192 .B noplain
193 disables mechanisms susceptible to simple passive attacks.
194 .TP
195 .B noactive
196 disables mechanisms susceptible to active attacks.
197 .TP
198 .B nodict
199 disables mechanisms susceptible to passive dictionary attacks.
200 .TP
201 .B noanonymous
202 disables mechanisms which support anonymous login.
203 .TP
204 .B forwardsec
205 requires forward secrecy between sessions.
206 .TP
207 .B passcred
208 requires mechanisms which pass client credentials (and allows
209 mechanisms which can pass credentials to do so).
210 .TP
211 .B minssf=<factor> 
212 specifies the minimum acceptable
213 .I security strength factor
214 as an integer approximating the effective key length used for
215 encryption.  0 (zero) implies no protection, 1 implies integrity
216 protection only, 56 allows DES or other weak ciphers, 112
217 allows triple DES and other strong ciphers, 128 allows RC4,
218 Blowfish and other modern strong ciphers.  The default is 0.
219 .TP
220 .B maxssf=<factor> 
221 specifies the maximum acceptable
222 .I security strength factor
223 as an integer (see
224 .B minssf
225 description).  The default is
226 .BR INT_MAX .
227 .TP
228 .B maxbufsize=<factor> 
229 specifies the maximum security layer receive buffer
230 size allowed.  0 disables security layers.  The default is 65536.
231 .RE
232 .SH TLS OPTIONS
233 If OpenLDAP is built with Transport Layer Security support, there
234 are more options you can specify.  These options are used when an
235 .B ldaps:// URI
236 is selected (by default or otherwise) or when the application
237 negotiates TLS by issuing the LDAP StartTLS operation.
238 .TP
239 .B TLS_CACERT <filename>
240 Specifies the file that contains certificates for all of the Certificate
241 Authorities the client will recognize.
242 .TP
243 .B TLS_CACERTDIR <path>
244 Specifies the path of a directory that contains Certificate Authority
245 certificates in separate individual files. The
246 .B TLS_CACERT
247 is always used before
248 .B TLS_CACERTDIR.
249 .TP
250 .B TLS_CERT <filename>
251 Specifies the file that contains the client certificate.
252 .B This is a user\-only option.
253 .TP
254 .B TLS_KEY <filename>
255 Specifies the file that contains the private key that matches the certificate
256 stored in the
257 .B TLS_CERT
258 file. Currently, the private key must not be protected with a password, so
259 it is of critical importance that the key file is protected carefully.
260 .B This is a user\-only option.
261 .TP
262 .B TLS_CIPHER_SUITE <cipher-suite-spec>
263 Specifies acceptable cipher suite and preference order.
264 <cipher-suite-spec> should be a cipher specification for OpenSSL,
265 e.g., HIGH:MEDIUM:+SSLv2.
266 .TP
267 .B TLS_RANDFILE <filename>
268 Specifies the file to obtain random bits from when /dev/[u]random is
269 not available. Generally set to the name of the EGD/PRNGD socket.
270 The environment variable RANDFILE can also be used to specify the filename.
271 .TP
272 .B TLS_REQCERT <level>
273 Specifies what checks to perform on server certificates in a TLS session,
274 if any. The
275 .B <level>
276 can be specified as one of the following keywords:
277 .RS
278 .TP
279 .B never
280 The client will not request or check any server certificate.
281 .TP
282 .B allow
283 The server certificate is requested. If no certificate is provided,
284 the session proceeds normally. If a bad certificate is provided, it will
285 be ignored and the session proceeds normally.
286 .TP
287 .B try
288 The server certificate is requested. If no certificate is provided,
289 the session proceeds normally. If a bad certificate is provided,
290 the session is immediately terminated.
291 .TP
292 .B demand | hard
293 These keywords are equivalent. The server certificate is requested. If no
294 certificate is provided, or a bad certificate is provided, the session
295 is immediately terminated. This is the default setting.
296 .RE
297 .TP
298 .B TLS_CRLCHECK <level>
299 Specifies if the Certificate Revocation List (CRL) of the CA should be 
300 used to verify if the server certificates have not been revoked. This
301 requires
302 .B TLS_CACERTDIR
303 parameter to be set.
304 .B <level>
305 can be specified as one of the following keywords:
306 .RS
307 .TP
308 .B none
309 No CRL checks are performed
310 .TP
311 .B peer
312 Check the CRL of the peer certificate
313 .TP
314 .B all
315 Check the CRL for a whole certificate chain
316 .RE
317 .SH "ENVIRONMENT VARIABLES"
318 .TP
319 LDAPNOINIT
320 disable all defaulting
321 .TP
322 LDAPCONF
323 path of a configuration file
324 .TP
325 LDAPRC
326 basename of ldaprc file in $HOME or $CWD
327 .TP
328 LDAP<option-name>
329 Set <option-name> as from ldap.conf
330 .SH FILES
331 .TP
332 .I  ETCDIR/ldap.conf
333 system-wide ldap configuration file
334 .TP
335 .I  $HOME/ldaprc, $HOME/.ldaprc
336 user ldap configuration file
337 .TP
338 .I  $CWD/ldaprc
339 local ldap configuration file
340 .SH "SEE ALSO"
341 .BR ldap (3),
342 .BR openssl (1),
343 .BR sasl (3)
344 .SH AUTHOR
345 Kurt Zeilenga, The OpenLDAP Project
346 .SH ACKNOWLEDGEMENTS
347 .B OpenLDAP
348 is developed and maintained by The OpenLDAP Project (http://www.openldap.org/).
349 .B OpenLDAP
350 is derived from University of Michigan LDAP 3.3 Release.