Krb5.conf

Overview#

The krb5.conf file contains Kerberos configuration information, including the locations of KDCs and admin servers for the Kerberos realms of interest, defaults for the current realm and for Kerberos applications, and mappings of hostnames onto Kerberos realms.

Normally, you should install your Krb5.conf file in the directory /etc. You can override the default location by setting the environment variable KRB5_CONFIG.

We recommend that you use a Krb5.conf as provided by your Kerberos team or the a Minimal Krb5.conf to get started.

Format#

The Krb5.conf file is set up in the style of a Windows INI file. Sections are headed by the section name, in square brackets. Each section may contain zero or more relations

Placing a `*' at the end of a line indicates that this is the final value for the tag. This means that neither the remainder of this configuration file nor any other configuration file will be checked for any other values for this tag.

For example, if you have the following lines:

foo = bar*
foo = baz
then the second value of foo (baz) would never be read.

What does Krb5.conf Control?#

The file consists of several stanzas, each of which controls certain aspects of the installation:

Example Minimal Krb5.conf#

A minimal /etc/krb5.conf file looks as follows (make sure the port and host name matches!):
[libdefaults]
    default_realm = EXAMPLE.COM

[realms]
    EXAMPLE.COM = {
            kdc = example.net:60088
    }

[domain_realm]
    .example.com = EXAMPLE.COM
    example.com = EXAMPLE.COM

Example of a Typical Krb5.conf for Microsoft Active Directory#

An Example YOURDOMAIN Krb5.conf that may help others:
##### /etc/krb5.conf
[logging]
 default = FILE:/var/log/krb5libs.log
 kdc = FILE:/var/log/krb5kdc.log
 admin_server = FILE:/var/log/kadmind.log

[libdefaults]
 default_realm = YOURDOMAIN.NET
 dns_lookup_realm = true
 dns_lookup_kdc = true
 ticket_lifetime = 24h
 renew_lifetime = 7d
 forwardable = true
 default_tkt_enctypes = arcfour-hmac-md5 des-cbc-crc des-cbc-md5
 default_tgs_enctypes = arcfour-hmac-md5 des-cbc-crc des-cbc-md5

[realms]
 YOURDOMAIN.NET = {
  default_domain = yourdomain.net
 }

[domain_realm]
 .yourdomain.net = YOURDOMAIN.NET
 yourdomain.net = YOURDOMAIN.NET

More Information#

There might be more information for this subject on one of the following: