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