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