1LDAP.CONF(5)                  File Formats Manual                 LDAP.CONF(5)
2
3
4

NAME

6       ldap.conf, .ldaprc - ldap configuration file
7

SYNOPSIS

9       /etc/openldap/ldap.conf, .ldaprc
10

DESCRIPTION

12       If  the  environment  variable LDAPNOINIT is defined, all defaulting is
13       disabled.
14
15       The ldap.conf configuration file is used to set system-wide defaults to
16       be applied when running ldap clients.
17
18       Users  may create an optional configuration file, ldaprc or .ldaprc, in
19       their home directory which will be used  to  override  the  system-wide
20       defaults  file.   The  file  ldaprc in the current working directory is
21       also used.
22
23       Additional configuration files can be specified using the LDAPCONF  and
24       LDAPRC  environment  variables.   LDAPCONF  may be set to the path of a
25       configuration file.  This path can be absolute or relative to the  cur‐
26       rent working directory.  The LDAPRC, if defined, should be the basename
27       of a file in the current working directory or in the user's home direc‐
28       tory.
29
30       Environmental  variables  may  also  be  used to augment the file based
31       defaults.  The name of the variable is the option name  with  an  added
32       prefix  of  LDAP.  For example, to define BASE via the environment, set
33       the variable LDAPBASE to the desired value.
34
35       Some options are user-only.  Such options are ignored if present in the
36       ldap.conf (or file specified by LDAPCONF).
37

OPTIONS

39       The  configuration options are case-insensitive; their value, on a case
40       by case basis, may  be  case-sensitive.   The  different  configuration
41       options are:
42
43       URI <ldap[s]://[name[:port]] ...>
44              Specifies  the  URI(s)  of  an  LDAP server(s) to which the LDAP
45              library should connect.  The URI scheme may be  either  ldap  or
46              ldaps  which  refer  to  LDAP  over  TCP and LDAP over SSL (TLS)
47              respectively.  Each server's name can be specified as a  domain-
48              style  name  or an IP address literal.  Optionally, the server's
49              name can followed by a ':' and the port number the  LDAP  server
50              is  listening  on.   If  no port number is provided, the default
51              port for the scheme is used (389 for ldap://, 636 for ldaps://).
52              A space separated list of URIs may be provided.
53
54       BASE <base>
55              Specifies the default base DN to use when performing ldap opera‐
56              tions.  The base must be specified as a  Distinguished  Name  in
57              LDAP format.
58
59       BINDDN <dn>
60              Specifies the default bind DN to use when performing ldap opera‐
61              tions.  The bind DN must be specified as a Distinguished Name in
62              LDAP format.  This is a user-only option.
63
64       HOST <name[:port] ...>
65              Specifies  the  name(s)  of  an LDAP server(s) to which the LDAP
66              library should connect.  Each server's name can be specified  as
67              a  domain-style name or an IP address and optionally followed by
68              a ':' and the port number the ldap server is  listening  on.   A
69              space  separated  list of hosts may be provided.  HOST is depre‐
70              cated in favor of URI.
71
72       PORT <port>
73              Specifies  the  default  port  used  when  connecting  to   LDAP
74              servers(s).   The  port  may  be specified as a number.  PORT is
75              deprecated in favor of URI.
76
77       REFERRALS <on/true/yes/off/false/no>
78              Specifies if the client should  automatically  follow  referrals
79              returned  by  LDAP  servers.   The default is on.  Note that the
80              command  line  tools  ldapsearch(1)  &co  always  override  this
81              option.
82
83       SIZELIMIT <integer>
84              Specifies  a  size  limit  to use when performing searches.  The
85              number should be a non-negative integer.  SIZELIMIT of zero  (0)
86              specifies unlimited search size.
87
88       TIMELIMIT <integer>
89              Specifies  a  time  limit  to use when performing searches.  The
90              number should be a non-negative integer.  TIMELIMIT of zero  (0)
91              specifies unlimited search time to be used.
92
93       DEREF <when>
94              Specifies  how  alias  dereferencing  is  done when performing a
95              search. The <when> can be specified as one of the following key‐
96              words:
97
98              never  Aliases are never dereferenced. This is the default.
99
100              searching
101                     Aliases  are  dereferenced  in  subordinates  of the base
102                     object, but not  in  locating  the  base  object  of  the
103                     search.
104
105              finding
106                     Aliases  are  only  dereferenced  when  locating the base
107                     object of the search.
108
109              always Aliases are dereferenced both in searching and in  locat‐
110                     ing the base object of the search.
111

SASL OPTIONS

113       If OpenLDAP is built with Simple Authentication and Security Layer sup‐
114       port, there are more options you can specify.
115
116       SASL_MECH <mechanism>
117              Specifies the SASL  mechanism  to  use.   This  is  a  user-only
118              option.
119
120       SASL_REALM <realm>
121              Specifies the SASL realm.  This is a user-only option.
122
123       SASL_AUTHCID <authcid>
124              Specifies  the  authentication  identity.   This  is a user-only
125              option.
126
127       SASL_AUTHZID <authcid>
128              Specifies the proxy authorization identity.  This is a user-only
129              option.
130
131       SASL_SECPROPS <properties>
132              Specifies  Cyrus  SASL security properties. The <properties> can
133              be specified as a comma-separated list of the following:
134
135              none   (without any  other  properties)  causes  the  properties
136                     defaults ("noanonymous,noplain") to be cleared.
137
138              noplain
139                     disables   mechanisms   susceptible   to  simple  passive
140                     attacks.
141
142              noactive
143                     disables mechanisms susceptible to active attacks.
144
145              nodict disables mechanisms  susceptible  to  passive  dictionary
146                     attacks.
147
148              noanonymous
149                     disables mechanisms which support anonymous login.
150
151              forwardsec
152                     requires forward secrecy between sessions.
153
154              passcred
155                     requires  mechanisms  which  pass client credentials (and
156                     allows mechanisms which can pass credentials to do so).
157
158              minssf=<factor>
159                     specifies the minimum acceptable security strength factor
160                     as an integer approximating the effective key length used
161                     for  encryption.   0  (zero)  implies  no  protection,  1
162                     implies integrity protection only, 56 allows DES or other
163                     weak ciphers, 112 allows  triple  DES  and  other  strong
164                     ciphers, 128 allows RC4, Blowfish and other modern strong
165                     ciphers.  The default is 0.
166
167              maxssf=<factor>
168                     specifies the maximum acceptable security strength factor
169                     as  an  integer (see minssf description).  The default is
170                     INT_MAX.
171
172              maxbufsize=<factor>
173                     specifies the maximum security layer receive buffer  size
174                     allowed.   0  disables  security  layers.  The default is
175                     65536.
176

TLS OPTIONS

178       If OpenLDAP is built with Transport Layer Security support,  there  are
179       more  options you can specify.  These options are used when an ldaps://
180       URI is selected (by default or otherwise) or when the application nego‐
181       tiates TLS by issuing the LDAP Start TLS operation.
182
183       TLS_CACERT <filename>
184              Specifies  the  file  that  contains certificates for all of the
185              Certificate Authorities the client will recognize.
186
187       TLS_CACERTDIR <path>
188              Specifies the path of  a  directory  that  contains  Certificate
189              Authority   certificates   in  separate  individual  files.  The
190              TLS_CACERT is always used before TLS_CACERTDIR.
191
192       TLS_CERT <filename>
193              Specifies the file that contains the client  certificate.   This
194              is a user-only option.
195
196       TLS_KEY <filename>
197              Specifies  the  file  that contains the private key that matches
198              the certificate stored in the TLS_CERT file. Currently, the pri‐
199              vate  key  must  not  be  protected with a password, so it is of
200              critical importance that the key file  is  protected  carefully.
201              This is a user-only option.
202
203       TLS_CIPHER_SUITE <cipher-suite-spec>
204              Specifies   acceptable   cipher   suite  and  preference  order.
205              <cipher-suite-spec>  should  be  a  cipher   specification   for
206              OpenSSL, e.g., HIGH:MEDIUM:+SSLv2.
207
208       TLS_RANDFILE <filename>
209              Specifies  the file to obtain random bits from when /dev/[u]ran‐
210              dom is not available. Generally set to the name of the EGD/PRNGD
211              socket.   The  environment variable RANDFILE can also be used to
212              specify the filename.
213
214       TLS_REQCERT <level>
215              Specifies what checks to perform on server certificates in a TLS
216              session, if any. The <level> can be specified as one of the fol‐
217              lowing keywords:
218
219              never  The client will not request or check any server  certifi‐
220                     cate.
221
222              allow  The server certificate is requested. If no certificate is
223                     provided, the session proceeds normally. If  a  bad  cer‐
224                     tificate  is provided, it will be ignored and the session
225                     proceeds normally.
226
227              try    The server certificate is requested. If no certificate is
228                     provided,  the  session  proceeds normally. If a bad cer‐
229                     tificate is provided, the session is  immediately  termi‐
230                     nated.
231
232              demand | hard
233                     These  keywords are equivalent. The server certificate is
234                     requested. If no certificate is provided, or a  bad  cer‐
235                     tificate  is  provided, the session is immediately termi‐
236                     nated. This is the default setting.
237
238       TLS_CRLCHECK <level>
239              Specifies if the Certificate Revocation List  (CRL)  of  the  CA
240              should  be  used  to  verify if the server certificates have not
241              been revoked. This requires TLS_CACERTDIR parameter to  be  set.
242              <level> can be specified as one of the following keywords:
243
244              none   No CRL checks are performed
245
246              peer   Check the CRL of the peer certificate
247
248              all    Check the CRL for a whole certificate chain
249

ENVIRONMENT VARIABLES

251       LDAPNOINIT
252              disable all defaulting
253
254       LDAPCONF
255              path of a configuration file
256
257       LDAPRC basename of ldaprc file in $HOME or $CWD
258
259       LDAP<option-name>
260              Set <option-name> as from ldap.conf
261

FILES

263       /etc/openldap/ldap.conf
264              system-wide ldap configuration file
265
266       $HOME/ldaprc, $HOME/.ldaprc
267              user ldap configuration file
268
269       $CWD/ldaprc
270              local ldap configuration file
271

SEE ALSO

273       ldap(3), openssl(1), sasl(3)
274

AUTHOR

276       Kurt Zeilenga, The OpenLDAP Project
277

ACKNOWLEDGEMENTS

279       OpenLDAP   is   developed   and  maintained  by  The  OpenLDAP  Project
280       (http://www.openldap.org/).  OpenLDAP is  derived  from  University  of
281       Michigan LDAP 3.3 Release.
282
283
284
2854.3 Berkeley Distribution          2007/2/16                      LDAP.CONF(5)
Impressum