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