1 .\" Copyright (c) 1999 - 2005 Kungliga Tekniska Högskolan
2 .\" (Royal Institute of Technology, Stockholm, Sweden).
3 .\" All rights reserved.
5 .\" Redistribution and use in source and binary forms, with or without
6 .\" modification, are permitted provided that the following conditions
9 .\" 1. Redistributions of source code must retain the above copyright
10 .\" notice, this list of conditions and the following disclaimer.
12 .\" 2. Redistributions in binary form must reproduce the above copyright
13 .\" notice, this list of conditions and the following disclaimer in the
14 .\" documentation and/or other materials provided with the distribution.
16 .\" 3. Neither the name of the Institute nor the names of its contributors
17 .\" may be used to endorse or promote products derived from this software
18 .\" without specific prior written permission.
20 .\" THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND
21 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
23 .\" ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE
24 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
26 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
27 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
28 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
29 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
39 .Nd configuration file for Kerberos 5
45 file specifies several configuration parameters for the Kerberos 5
46 library, as well as for some programs.
48 The file consists of one or more sections, containing a number of
50 The value of each binding can be either a string or a list of other
52 The grammar looks like:
53 .Bd -literal -offset indent
63 '[' section_name ']' bindings
74 name '=' '{' bindings '}'
81 consists of one or more non-whitespace characters.
83 STRINGs that are specified later in this man-page uses the following
85 .Bl -tag -width "xxx" -offset indent
87 values can be either yes/true or no/false.
89 values can be a list of year, month, day, hour, min, second.
90 Example: 1 month 2 days 30 min.
91 If no unit is given, seconds is assumed.
93 valid encryption types are: des-cbc-crc, des-cbc-md4, des-cbc-md5,
94 des3-cbc-sha1, arcfour-hmac-md5, aes128-cts-hmac-sha1-96, and
95 aes256-cts-hmac-sha1-96 .
97 an address can be either a IPv4 or a IPv6 address.
100 Currently recognised sections and bindings are:
101 .Bl -tag -width "xxx" -offset indent
103 Specifies the default values to be used for Kerberos applications.
104 You can specify defaults per application, realm, or a combination of
106 The preference order is:
109 .Va application Va realm Va option
111 .Va application Va option
118 The supported options are:
119 .Bl -tag -width "xxx" -offset indent
120 .It Li forwardable = Va boolean
121 When obtaining initial credentials, make the credentials forwardable.
122 .It Li proxiable = Va boolean
123 When obtaining initial credentials, make the credentials proxiable.
124 .It Li no-addresses = Va boolean
125 When obtaining initial credentials, request them for an empty set of
126 addresses, making the tickets valid from any address.
127 .It Li ticket_lifetime = Va time
128 Default ticket lifetime.
129 .It Li renew_lifetime = Va time
130 Default renewable ticket lifetime.
131 .It Li encrypt = Va boolean
132 Use encryption, when available.
133 .It Li forward = Va boolean
134 Forward credentials to remote host (for
140 .Bl -tag -width "xxx" -offset indent
141 .It Li default_realm = Va REALM
142 Default realm to use, this is also known as your
144 The default is the result of
145 .Fn krb5_get_host_realm "local hostname" .
146 .It Li allow_weak_crypto = Va boolean
147 is weaks crypto algorithms allowed to be used, among others, DES is
149 .It Li clockskew = Va time
150 Maximum time differential (in seconds) allowed when comparing
152 Default is 300 seconds (five minutes).
153 .It Li kdc_timeout = Va time
154 Maximum time to wait for a reply from the kdc, default is 3 seconds.
155 .It Li v4_name_convert
156 .It Li v4_instance_resolve
157 These are described in the
158 .Xr krb5_425_conv_principal 3
161 .Bl -tag -width "xxx" -offset indent
162 .It Va destination-realm Li = Va next-hop-realm
166 This is deprecated, see the
169 .It Li default_cc_type = Va cctype
170 sets the default credentials type.
171 .It Li default_cc_name = Va ccname
172 the default credentials cache name.
173 If you want to change the type only use
174 .Li default_cc_type .
175 The string can contain variables that are expanded on runtime.
176 Only support variable now is
178 that expands to the current user id.
179 .It Li default_etypes = Va etypes ...
180 A list of default encryption types to use. (Default: all enctypes if
181 allow_weak_crypto = TRUE, else all enctypes except single DES enctypes.)
182 .It Li default_as_etypes = Va etypes ...
183 A list of default encryption types to use in AS requests. (Default: the
184 value of default_etypes.)
185 .It Li default_tgs_etypes = Va etypes ...
186 A list of default encryption types to use in TGS requests. (Default:
187 the value of default_etypes.)
188 .It Li default_etypes_des = Va etypes ...
189 A list of default encryption types to use when requesting a DES credential.
190 .It Li default_keytab_name = Va keytab
191 The keytab to use if no other is specified, default is
192 .Dq FILE:/etc/krb5.keytab .
193 .It Li dns_lookup_kdc = Va boolean
194 Use DNS SRV records to lookup KDC services location.
195 .It Li dns_lookup_realm = Va boolean
196 Use DNS TXT records to lookup domain to realm mappings.
197 .It Li kdc_timesync = Va boolean
198 Try to keep track of the time differential between the local machine
199 and the KDC, and then compensate for that when issuing requests.
200 .It Li max_retries = Va number
201 The max number of times to try to contact each KDC.
202 .It Li large_msg_size = Va number
203 The threshold where protocols with tiny maximum message sizes are not
204 considered usable to send messages to the KDC.
205 .It Li ticket_lifetime = Va time
206 Default ticket lifetime.
207 .It Li renew_lifetime = Va time
208 Default renewable ticket lifetime.
209 .It Li forwardable = Va boolean
210 When obtaining initial credentials, make the credentials forwardable.
211 This option is also valid in the [realms] section.
212 .It Li proxiable = Va boolean
213 When obtaining initial credentials, make the credentials proxiable.
214 This option is also valid in the [realms] section.
215 .It Li verify_ap_req_nofail = Va boolean
216 If enabled, failure to verify credentials against a local key is a
218 The application has to be able to read the corresponding service key
220 Some applications, like
222 enable this option unconditionally.
223 .It Li warn_pwexpire = Va time
224 How soon to warn for expiring password.
225 Default is seven days.
226 .It Li http_proxy = Va proxy-spec
227 A HTTP-proxy to use when talking to the KDC via HTTP.
228 .It Li dns_proxy = Va proxy-spec
229 Enable using DNS via HTTP.
230 .It Li extra_addresses = Va address ...
231 A list of addresses to get tickets for along with all local addresses.
232 .It Li time_format = Va string
233 How to print time strings in logs, this string is passed to
235 .It Li date_format = Va string
236 How to print date strings in logs, this string is passed to
238 .It Li log_utc = Va boolean
239 Write log-entries using UTC instead of your local time zone.
240 .It Li scan_interfaces = Va boolean
241 Scan all network interfaces for addresses, as opposed to simply using
242 the address associated with the system's host name.
243 .It Li fcache_version = Va int
244 Use file credential cache format version specified.
245 .It Li krb4_get_tickets = Va boolean
246 Also get Kerberos 4 tickets in
250 This option is also valid in the [realms] section.
251 .It Li fcc-mit-ticketflags = Va boolean
252 Use MIT compatible format for file credential cache.
253 It's the field ticketflags that is stored in reverse bit order for
254 older than Heimdal 0.7.
257 make it store the MIT way, this is default for Heimdal 0.7.
258 .It Li check-rd-req-server
259 If set to "ignore", the framework will ignore any the server input to
261 this is very useful when the GSS-API server input the
262 wrong server name into the gss_accept_sec_context call.
263 .It Li k5login_directory = Va directory
264 Alternative location for user .k5login files. Tokens in the form of
265 %{luser} are expanded to the name of the user whose .k5login file is
266 needed. This option is provided for compatibility with MIT krb5
268 .It Li k5login_authoritative = Va boolean
269 If true then if a principal is not found in k5login files then
271 will not fallback on principal to username mapping. This option is
272 provided for compatibility with MIT krb5 configuration files.
273 .It Li kuserok = Va rule ...
276 behavior. If multiple values are given, then
278 will evaluate them in order until one succeeds or all fail. Rules are
279 implemented by plugins, with three built-in plugins
280 described below. Default: USER-K5LOGIN SIMPLE DENY.
281 .It Li kuserok = Va DENY
282 If set and evaluated then
284 will deny access to the given username no matter what the principal name
286 .It Li kuserok = Va SIMPLE
287 If set and evaluated then
289 will use principal to username mapping (see auth_to_local below). If
290 the principal maps to the requested username then access is allowed.
291 .It Li kuserok = Va SYSTEM-K5LOGIN[:directory]
292 If set and evaluated then
294 will use k5login files named after the
298 in the given directory or in
299 .Pa /etc/k5login.d/ .
300 If a directory is given
301 then tokens will be expanded; the %{luser} token will be replaced with
306 K5login files are text files, with each line containing just a principal
307 name; principals apearing in a user's k5login file are permitted access
308 to the user's account. Note: this rule performs no ownership nor
309 permissions checks on k5login files; proper ownership and
310 permissions/ACLs are expected due to the system k5login location being a
312 .It Li kuserok = Va USER-K5LOGIN
313 If set and evaluated then
318 .Pa ~luser/.k5login.d/* .
319 User k5login files and directories must be owned by the user and must
320 not have world nor group write permissions.
321 .It Li aname2lname-text-db = Va filename
322 The named file must be a sorted (in increasing order) text file where
323 every line consists of an unparsed principal name optionally followed by
324 whitespace and a username. The aname2lname function will do a binary
325 search on this file, if configured, looking for lines that match the
326 given principal name, and if found the given username will be used, or,
327 if the username is missing, an error will be returned. If the file
328 doesn't exist, or if no matching line is found then other plugins will
329 be allowed to run. Note: large
330 .It Li name_canon_rules = Va rules
331 One or more name canonicalization rules. Each rule consists of one or
332 more tokens separated by colon (':'). The first token must be a rule
333 type, one of: as-is, qualify, use-resolver-searchlist, or nss. The
334 remaining tokens must be options tokens: secure, ccache_only,
335 use_referrals, no_referrals, mindots=
341 These rules are applied to host-based service principal names in order
342 until one rule succeeds or all fail. The as-is rules match on number of
343 dots in the hostname or domain suffix of the hostname and attempt the
344 hostname as-is on match. The qualify rules qualify the hostname with
345 the given domain (and realm, if given) if necessary and attempt the
346 resulting hostname. The resolver searchlist rule expands to qualify
347 rules using the corresponding domainnames from the DNS resolver's
348 searchlist. The "nss" rule performs a hostname lookup. The secure
349 option indicates that an insecure service principal unknown error will
350 result in immediate failure. Name canonicalization is deferred unless
351 only the default rule is given. Default: nss.
353 .It Li [domain_realm]
354 This is a list of mappings from DNS domain to Kerberos realm.
355 Each binding in this section looks like:
359 The domain can be either a full name of a host or a trailing
360 component, in the latter case the domain-string should start with a
362 The trailing component only matches hosts that are in the same domain, ie
365 .Dq foo.example.com ,
367 .Dq foo.test.example.com .
369 The realm may be the token `dns_locate', in which case the actual
370 realm will be determined using DNS (independently of the setting
371 of the `dns_lookup_realm' option).
373 .Bl -tag -width "xxx" -offset indent
375 .Bl -tag -width "xxx" -offset indent
376 .It Li kdc = Va [service/]host[:port]
377 Specifies a list of kdcs for this realm.
381 default value for the
386 port (depending on service) will be used.
387 The kdcs will be used in the order that they are specified.
391 specifies over what medium the kdc should be
393 Possible services are
398 Http can also be written as
404 .It Li admin_server = Va host[:port]
405 Specifies the admin server for this realm, where all the modifications
406 to the database are performed.
407 .It Li kpasswd_server = Va host[:port]
408 Points to the server where all the password changes are performed.
409 If there is no such entry, the kpasswd port on the admin_server host
411 .It Li krb524_server = Va host[:port]
412 Points to the server that does 524 conversions.
413 If it is not mentioned, the krb524 port on the kdcs will be tried.
414 .It Li v4_instance_convert
415 .It Li v4_name_convert
416 .It Li default_domain
418 .Xr krb5_425_conv_principal 3 .
419 .It Li tgs_require_subkey
420 a boolan variable that defaults to false.
421 Old DCE secd (pre 1.1) might need this to be true.
422 .It Li auth_to_local_names = {
423 .Bl -tag -width "xxx" -offset indent
424 .It Va principal_name = Va username
427 will be mapped to the given
434 .It Li auth_to_local = HEIMDAL_DEFAULT
435 Use the Heimdal default principal to username mapping.
436 Applies to principals from the
441 .It Li auth_to_local = DEFAULT
442 Use the MIT default principal to username mapping.
443 Applies to principals from the
448 .It Li auth_to_local = DB:/path/to/db.txt
449 Use a binary search of the given DB. The DB must be a flat-text
450 file sortedf in the "C" locale, with each record being a line
451 (separated by either LF or CRLF) consisting of a principal name
452 followed by whitespace followed by a username.
453 Applies to principals from the
458 .It Li auth_to_local = DB:/path/to/db
459 Use the given DB, if there's a plugin for it.
460 Applies to principals from the
465 .It Li auth_to_local = RULE:...
466 Use the given rule, if there's a plugin for it.
467 Applies to principals from the
472 .It Li auth_to_local = NONE
473 No additional principal to username mapping is done. Note that
474 .Va auth_to_local_names
477 rules have precedence.
482 .Bl -tag -width "xxx" -offset indent
483 .It Va client-realm Li = {
484 .Bl -tag -width "xxx" -offset indent
485 .It Va server-realm Li = Va hop-realm ...
486 This serves two purposes. First the first listed
488 tells a client which realm it should contact in order to ultimately
489 obtain credentials for a service in the
491 Secondly, it tells the KDC (and other servers) which realms are
492 allowed in a multi-hop traversal from
496 Except for the client case, the order of the realms are not important.
501 .Bl -tag -width "xxx" -offset indent
502 .It Va entity Li = Va destination
505 should use the specified
510 manual page for a list of defined destinations.
513 .Bl -tag -width "xxx" -offset indent
514 .It Li database Li = {
515 .Bl -tag -width "xxx" -offset indent
516 .It Li dbname Li = Va DATABASENAME
517 Use this database for this realm.
518 See the info documetation how to configure different database backends.
519 .It Li realm Li = Va REALM
520 Specifies the realm that will be stored in this database.
521 It realm isn't set, it will used as the default database, there can
522 only be one entry that doesn't have a
525 .It Li mkey_file Li = Pa FILENAME
526 Use this keytab file for the master key of this database.
528 .Va DATABASENAME Ns .mkey
530 .It Li acl_file Li = PA FILENAME
531 Use this file for the ACL list of this database.
532 .It Li log_file Li = Pa FILENAME
533 Use this file as the log of changes performed to the database.
536 for propagating changes to slaves.
539 .It Li max-request = Va SIZE
540 Maximum size of a kdc request.
541 .It Li require-preauth = Va BOOL
542 If set pre-authentication is required.
543 Since krb4 requests are not pre-authenticated they will be rejected.
544 .It Li ports = Va "list of ports"
545 List of ports the kdc should listen to.
546 .It Li addresses = Va "list of interfaces"
547 List of addresses the kdc should bind to.
548 .It Li enable-kerberos4 = Va BOOL
549 Turn on Kerberos 4 support.
550 .It Li v4-realm = Va REALM
551 To what realm v4 requests should be mapped.
552 .It Li enable-524 = Va BOOL
553 Should the Kerberos 524 converting facility be turned on.
554 Default is the same as
555 .Va enable-kerberos4 .
556 .It Li enable-http = Va BOOL
557 Should the kdc answer kdc-requests over http.
558 .It Li tgt-use-strongest-session-key = Va BOOL
559 If this is TRUE then the KDC will prefer the strongest key from the
560 client's AS-REQ or TGS-REQ enctype list for the ticket session key that
561 is supported by the KDC and the target principal when the target
562 principal is a krbtgt principal. Else it will prefer the first key from
563 the client's AS-REQ enctype list that is also supported by the KDC and
564 the target principal. Defaults to TRUE.
565 .It Li svc-use-strongest-session-key = Va BOOL
566 Like tgt-use-strongest-session-key, but applies to the session key
567 enctype of tickets for services other than krbtgt principals. Defaults
569 .It Li preauth-use-strongest-session-key = Va BOOL
570 If TRUE then select the strongest possible enctype from the client's
571 AS-REQ for PA-ETYPE-INFO2 (i.e., for password-based pre-authentication).
572 Else pick the first supported enctype from the client's AS-REQ. Defaults
574 .It Li use-strongest-server-key = Va BOOL
575 If TRUE then the KDC picks, for the ticket encrypted part's key, the
576 first supported enctype from the target service principal's hdb entry's
577 current keyset. Else the KDC picks the first supported enctype from the
578 target service principal's hdb entry's current keyset. Defaults to TRUE.
579 .It Li check-ticket-addresses = Va BOOL
580 Verify the addresses in the tickets used in tgs requests.
582 .It Li allow-null-ticket-addresses = Va BOOL
583 Allow address-less tickets.
585 .It Li allow-anonymous = Va BOOL
586 If the kdc is allowed to hand out anonymous tickets.
587 .It Li encode_as_rep_as_tgs_rep = Va BOOL
588 Encode as-rep as tgs-rep tobe compatible with mistakes older DCE secd did.
590 .It Li kdc_warn_pwexpire = Va TIME
591 The time before expiration that the user should be warned that her
592 password is about to expire.
593 .It Li logging = Va Logging
594 What type of logging the kdc should use, see also [logging]/kdc.
596 .Bl -tag -width "xxx" -offset indent
597 .It Va principal Li = Va BOOL
598 boolean value if the 524 daemon should return AFS 2b tokens for
603 .It Li hdb-ldap-structural-object Va structural object
604 If the LDAP backend is used for storing principals, this is the
605 structural object that will be used when creating and when reading
607 The default value is account .
608 .It Li hdb-ldap-create-base Va creation dn
609 is the dn that will be appended to the principal when creating entries.
610 Default value is the search dn.
611 .It Li enable-digest = Va BOOL
612 Should the kdc answer digest requests. The default is FALSE.
613 .It Li digests_allowed = Va list of digests
614 Specifies the digests the kdc will reply to. The default is
618 .Bl -tag -width "xxx" -offset indent
619 .It Li require-preauth = Va BOOL
620 If pre-authentication is required to talk to the kadmin server.
621 .It Li password_lifetime = Va time
622 If a principal already have its password set for expiration, this is
623 the time it will be valid for after a change.
624 .It Li default_keys = Va keytypes...
627 try to parse it as a sequence of
628 .Va etype:salttype:salt
629 syntax of this if something like:
631 [(des|des3|etype):](pw-salt|afs3-salt)[:string]
635 is omitted it means everything, and if string is omitted it means the
636 default salt string (for that principal and encryption type).
637 Additional special values of keytypes are:
638 .Bl -tag -width "xxx" -offset indent
646 .It Li use_v4_salt = Va BOOL
647 When true, this is the same as
649 .Va default_keys = Va des3:pw-salt Va v4
651 and is only left for backwards compatibility.
653 .It Li [password_quality]
654 Check the Password quality assurance in the info documentation for
656 .Bl -tag -width "xxx" -offset indent
657 .It Li check_library = Va library-name
658 Library name that contains the password check_function
659 .It Li check_function = Va function-name
660 Function name for checking passwords in check_library
661 .It Li policy_libraries = Va library1 ... libraryN
662 List of libraries that can do password policy checks
663 .It Li policies = Va policy1 ... policyN
664 List of policy names to apply to the password. Builtin policies are
665 among other minimum-length, character-class, external-check.
670 points to the configuration file to read.
672 .Bl -tag -width "/etc/krb5.conf"
673 .It Pa /etc/krb5.conf
674 configuration file for Kerberos 5.
677 .Bd -literal -offset indent
679 default_realm = FOO.SE
680 name_canon_rules = as-is:realm=FOO.SE
681 name_canon_rules = qualify:domain=foo.se:realm=FOO.SE
682 name_canon_rules = qualify:domain=bar.se:realm=FOO.SE
683 name_canon_rules = nss
689 kdc = kerberos.foo.se
693 v4_instance_convert = {
696 default_domain = foo.se
699 kdc = FILE:/var/heimdal/kdc.log
701 default = SYSLOG:INFO:USER
706 is read and parsed by the krb5 library, there is not a lot of
707 opportunities for programs to report parsing errors in any useful
709 To help overcome this problem, there is a program
713 and tries to emit useful diagnostics from parsing errors.
714 Note that this program does not have any way of knowing what options
715 are actually used and thus cannot warn about unknown or misspelled
719 .Xr krb5_425_conv_principal 3 ,
722 .Xr verify_krb5_conf 8