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.


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:
  • [libdefaults] - Contains default values used by the Kerberos V5 library.
  • [login] - Contains default values used by the Kerberos V5 login program.
  • [appdefaults] - Contains default values that can be used by Kerberos V5 applications.
  • [realms] - Contains subsections keyed by Kerberos realm names. Each subsection describes realm-specific information, including where to find the Kerberos servers for that realm.
  • [domain_realm] - Contains relations which map domain names and subdomains onto Kerberos realm names. This is used by programs to determine what realm a host should be in, given its fully qualified domain name.
  • [logging] - Contains relations which determine how Kerberos programs are to perform logging.
  • [capaths] - Contains the authentication paths used with direct (nonhierarchical) cross-realm authentication. Entries in this section are used by the client to determine the intermediate realms which may be used in cross-realm authentication. It is also used by the end-service when checking the transited field for trusted intermediate realms.

Example Minimal Krb5.conf#

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

            kdc = example.net:60088

    .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
 default = FILE:/var/log/krb5libs.log
 kdc = FILE:/var/log/krb5kdc.log
 admin_server = FILE:/var/log/kadmind.log

 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

  default_domain = yourdomain.net

 .yourdomain.net = YOURDOMAIN.NET
 yourdomain.net = YOURDOMAIN.NET

More Information#

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