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