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