Kerberos V5 System Administrator’s Guide

Release: 1.0

Document Edition: 1.0

Last updated: November 27, 1996

MIT

Copyright \begin{matrix}c \\ ◯ \end{matrix} 1990, 1991, 1992, 1993, 1994, 1995, 1996 by the Massachusetts Institute of Technology.

Export of software employing encryption from the United States of America may require a specific license from the United States Government. It is the responsibility of any person or organization contemplating export to obtain such a license before exporting.

WITHIN THAT CONSTRAINT, permission to use, copy, modify, and distribute this software and its documentation for any purpose and without fee is hereby granted, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting documentation, and that the name of M.I.T. not be used in advertising or publicity pertaining to distribution of the software without specific, written prior permission. M.I.T. makes no representations about the suitability of this software for any purpose. It is provided “as is” without express or implied warranty.

The following copyright and permission notice applies to the OpenVision Kerberos Administration system located in kadmin/create, kadmin/dbutil, kadmin/passwd, kadmin/server, lib/kadm5, and portions of lib/rpc:

Copyright, OpenVision Technologies, Inc., 1996, All Rights Reserved

WARNING: Retrieving the OpenVision Kerberos Administration system source code, as described below, indicates your acceptance of the following terms. If you do not agree to the following terms, do not retrieve the OpenVision Kerberos administration system.

You may freely use and distribute the Source Code and Object Code compiled from it, with or without modification, but this Source Code is provided to you "AS IS" EX-CLUSIVE OF ANY WARRANTY, INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, OR ANY OTHER WARRANTY, WHETHER EXPRESS OR IMPLIED. IN NO EVENT WILL OPENVISION HAVE ANY LIABILITY FOR ANY LOST PROFITS, LOSS OF DATA OR COSTS OF PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, OR FOR ANY SPECIAL, INDIRECT, OR CONSEQUEN-TIAL DAMAGES ARISING OUT OF THIS AGREEMENT, INCLUDING, WITH-OUT LIMITATION, THOSE RESULTING FROM THE USE OF THE SOURCE CODE, OR THE FAILURE OF THE SOURCE CODE TO PERFORM, OR FOR ANY OTHER REASON.

OpenVision retains all copyrights in the donated Source Code. OpenVision also retains copyright to derivative works of the Source Code, whether created by OpenVision or by a third party. The OpenVision copyright notice must be preserved if derivative works are made based on the donated Source Code.

OpenVision Technologies, Inc. has donated this Kerberos Administration system to MIT for inclusion in the standard Kerberos 5 distribution. This donation underscores our commitment to continuing Kerberos technology development and our gratitude for the valuable work which has been performed by MIT and the Kerberos community.

Kerberos V5 includes documentation and software developed at the University of California at Berkeley, which includes this copyright notice:

Copyright \begin{matrix}c \\ ◯ \end{matrix} 1983 Regents of the University of California. All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

3. All advertising materials mentioning features or use of this software must display the following

acknowledgement:

This product includes software developed by the University of California, Berkeley and its contributors.

4. Neither the name of the University nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

Permission is granted to make and distribute verbatim copies of this manual provided the copyright notices and this permission notice are preserved on all copies.

Permission is granted to copy and distribute modified versions of this manual under the conditions for verbatim copying, provided also that the entire resulting derived work is distributed under the terms of a permission notice identical to this one.

Permission is granted to copy and distribute translations of this manual into another language, under the above conditions for modified versions.

1 Introduction

1.1 Why Should I use Kerberos?

Since Kerberos negotiates authenticated, and optionally encrypted, communications between two points anywhere on the internet, it provides a layer of security that is not dependent on which side of a firewall either client is on. Since studies have shown that half of the computer security breaches in industry happen from inside firewalls, Kerberos V5 from MIT will play a vital role in the security of your network.

1.2 Documentation for Kerberos V5

This document is one piece of the document set for Kerberos V5. The documents, and their intended audiences, are:

• Kerberos V5 Installation Guide: a concise guide for installing Kerberos V5. Kerberos administrators (particularly whoever will be making site-wide decisions about the installation) and the system administrators who will be installing the software should read this guide.

• Kerberos V5 System Administrator’s Guide: a sysadmin’s guide to administering a Kerberos installation. The System Administrator’s Guide describes the administration software and suggests policies and procedures for administering a Kerberos installation. Anyone who will have administrative access to your Kerberos database should read this guide.

• Kerberos V5 UNIX User’s Guide: a guide to using the Kerberos UNIX client programs. All users on UNIX systems should read this guide, particularly the “Tutorial” section.

1.3 Overview of This Guide

The next chapter describes how Kerberos works.

Chapter three describes administration of the principals in the Kerberos database.

Chapter four describes administrative programs for manipulating the Kerberos database as a whole.

Chapter five describes issues to consider when adding an application server to the database.

Chapter six describes our problem reporting system.

The appendices include sample configuration files, the list of Kerberos error messages, and a complete list of the time zones understood by kadmin.

2 Kerberos V5 System Administrator’s Guide

2 How Kerberos Works

This section provides a simplified description of a general user’s interaction with the Kerberos system. This interaction happens transparently—users don’t need to know and probably don’t care about what’s going on—but Kerberos administrators might find a schematic description of the process useful. This description glosses over a lot of details; for more information, see Kerberos: An Authentication Service for Open Network Systems, a paper presented at Winter USENIX 1988, in Dallas, Texas. This paper can be retreived by FTP from athena-dist.mit.edu, in the location:

/pub/ATHENA/kerberos/doc/USENIX.ps.

2.1 Network Services and Their Client Programs

In an environment that provides network services, you use client programs to request services from server programs that are somewhere on the network. Suppose you have logged in to a workstation and you want to ‘rlogin’ to a typical UNIX host. You use the local ‘rlogin’ client program to contact the remote machine’s ‘rlogind’ daemon.

2.2 Kerberos Tickets

Under Kerberos, the ‘klogind’ daemon allows you to login to a remote machine if you can provide ‘klogind’ a Kerberos ticket which proves your identity. In addition to the ticket, you must also have possession of the corresponding ticket session key. The combination of a ticket and the ticket’s session key is known as a credential.

Typically, a client program automatically obtains credentials identifying the person using the client program. The credentials are obtained from a Kerberos server that resides somewhere on the network. A Kerberos server maintains a database of user, server, and password information.

2.3 The Kerberos Database

Kerberos will give you credentials only if you have an entry in the Kerberos server’s Kerberos database. Your database entry includes your Kerberos principal (an identifying string, which is often just your username), and your Kerberos password. Every Kerberos user must have an entry in this database.

2.4 Kerberos Realms

Each administrative domain will have its own Kerberos database, which contains information about the users and services for that particular site or administrative domain. This administrative domain is the Kerberos realm.

Each Kerberos realm will have at least one Kerberos server, where the master Kerberos database for that site or administrative domain is stored. A Kerberos realm may also have one or more slave servers, which have read-only copies of the Kerberos database that are periodically propagated from the master server. For more details on how this is done, see the “Set Up the Slave KDCs for Database Propagation” and “Propagate the Database to Each Slave KDC” sections of the Kerberos V5 Installation Guide.

2.5 The Ticket-Granting Ticket

The ‘kinit’ command prompts for your password. If you enter it successfully, you will obtain a ticket-granting ticket and a ticket session key which gives you the right to use the ticket. This combination of the ticket and its associated key is known as your credentials. As illustrated below, client programs use your ticket-granting ticket credentials in order to obtain client-specific credentials as needed.

Your credentials are stored in a credentials cache, which is often just a file in /tmp. The credentials cache is also called the ticket file, especially in Kerberos V4 documentation. Note, however, that a credentials cache does not have to be stored in a file.

2.6 Network Services and the Master Database

The master database also contains entries for all network services that require Kerberos authentication. Suppose that your site has a machine, ‘laughter.mit.edu’, that requires Kerberos authentication from anyone who wants to ‘rlogin’ to it. The host’s Kerberos realm is ‘ATHENA.MIT.EDU’.

This service must be registered in the Kerberos database, using the proper service name, which in this case is the principal:

     host/laughter.mit.edu@ATHENA.MIT.EDU

The ‘/’ character separates the Kerberos primary (in this case, ‘host’) from the instance (in this case, ‘laughter.mit.edu’); the ‘@’ character separates the realm name (in this case, ‘ATHENA.MIT.EDU’) from the rest of the principal. The primary, ‘host’, denotes the name or type of the service that is being offered: generic host-level access to the machine. The instance, ‘laughter.mit.edu’, names the specific machine that is offering this service. There will generally be many different machines, each offering one particular type of service, and the instance serves to give each one of these servers a different Kerberos principal.

2.6.1 The Keytab File

For each service, there must also be a service key known only by Kerberos and the service. On the Kerberos server, the service key is stored in the Kerberos database.

On the server host, these service keys are stored in key tables, which are files known as keytabs.^{1} For example, the service keys used by services that run as root are usually stored in the keytab file /etc/krb5.keytab. N.B.: This service key is the equivalent of the service’s password, and must be kept secure. Data which is meant to be read only by the service is encrypted using this key.

2.7 The User–Kerberos Interaction

Suppose that you walk up to a host intending to login to it, and then ‘rlogin’ to the machine ‘laughter’. Here’s what happens:

1. You login to the workstation and use the ‘kinit’ command to get a ticket-granting ticket. This command prompts you for your Kerberos password. (On systems running the Kerberos V5 ‘login’ program, this may be done as part of the login process, not requiring the user to run a separate program.) A. The ‘kinit’ command sends your request to the Kerberos master server machine. The

server software looks for your principal name’s entry in the Kerberos database. B. If this entry exists, the Kerberos server creates and returns a ticket-granting ticket and

the key which allows you to use it, encrypted by your password. If ‘kinit’ can decrypt the Kerberos reply using the password you provide, it stores this ticket in a credentials cache on your local machine for later use. The name of the credentials cache can be specified in the ‘KRB5CCNAME’ environment variable. If this variable is not set, the name of the file will be ‘/tmp/krb5cc_<uid>’, where <uid> is your UNIX user-id, represented in decimal format.

2. Now you use the ‘rlogin’ client to access the machine ‘laughter’.

host% rlogin laughter A. The ‘rlogin’ client checks your ticket file to see if you have a ticket for the ‘host’ service

for ‘laughter’. You don’t, so ‘rlogin’ uses the credential cache’s ticket-granting ticket to make a request to the master server’s ticket-granting service.

B. This ticket-granting service receives the request for a ticket for ‘host/laughter.mit.edu’, and looks in the master database for an entry for ‘host/laughter.mit.edu’. If the entry exists, the ticket-granting service issues you a ticket for that service. That ticket is also cached in your credentials cache.

1 Keytabs were called srvtabs in Kerberos V4.

C. The ‘rlogin’ client now sends that ticket to the ‘laughter’ ‘klogind’ service program. The service program checks the ticket by using its own service key. If the ticket is valid, it now knows your identity. If you are allowed to login to ‘laughter’ (because your username matches one in /etc/passwd, or your Kerberos principal is in the appropriate ‘.k5login’ file), klogind will let you login.

2.8 Definitions

Following are definitions of some of the Kerberos terminology.

client an entity that can obtain a ticket. This entity is usually either a user or a host.

host a computer that can be accessed over a network.

Kerberos in Greek mythology, the three-headed dog that guards the entrance to the underworld. In the computing world, Kerberos is a network security package that was developed at MIT.

KDC Key Distribution Center. A machine that issues Kerberos tickets.

keytab a key table file containing one or more keys. A host or service uses a keytab file in much the same way as a user uses his/her password.

principal a string that names a specific entity to which a set of credentials may be assigned. It generally has three parts:

primary the first part of a Kerberos principal. In the case of a user, it is the username. In the case of a service, it is the name of the service.

instance the second part of a Kerberos principal. It gives information that qualifies the primary. The instance may be null. In the case of a user, the instance is often used to describe the intended use of the corresponding credentials. In the case of a host, the instance is the fully qualified hostname.

realm the logical network served by a single Kerberos database and a set of Key Distribution Centers. By convention, realm names are generally all uppercase letters, to differentiate the realm from the internet domain.

The typical format of a typical Kerberos principal is primary/instance@REALM.

service any program or computer you access over a network. Examples of services include “host” (a host, e.g., when you use telnet and rsh), “ftp” (FTP), “krbtgt” (authentication; cf. ticket-granting ticket), and “pop” (email).

ticket a temporary set of electronic credentials that verify the identity of a client for a particular service.

TGT Ticket-Granting Ticket. A special Kerberos ticket that permits the client to obtain additional Kerberos tickets within the same Kerberos realm.

3 Configuration Files

3.1 krb5.conf

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’.

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, of the form:

     foo = bar

or

     fubar = { foo = bar baz = quux }

The krb5.conf file may contain any or all of the following seven sections:

libdefaults Contains default values used by the Kerberos V5 library. appdefaults

Contains default values 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 au-

thentication. 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 endservice when checking the transited field for trusted intermediate realms.

kdc For a KDC, may contain the location of the kdc.conf file.

3.1.1 [libdefaults]

The libdefaults section may contain any of the following relations:

default realm Identifies the default Kerberos realm for the client. Set its value to your Kerberos realm.

default tgs enctypes Identifies the supported list of session key encryption types that should be returned by the KDC. The list may be delimited with commas or whitespace. Currently, the only supported encryption type is "des-cbc-crc". Support for other encryption types is planned in the future.

default tkt enctypes Identifies the supported list of session key encryption types that should be requested by the client. The format is the same as for default tkt enctypes. Again, the only supported encryption type is "des-cbc-crc".

clockskew Sets the maximum allowable amount of clockskew in seconds that the library will tolerate before assuming that a Kerberos message is invalid. The default value is 300 seconds, or five minutes.

checksum type Used for compatability with DCE security servers which do not support the default CKSUMTYPE RSA MD5 used by this version of Kerberos. A value of 1 indicates the default checksum type. Use a value of 2 to use the CKSUMTYPE RSA MD4 instead. This applies to DCE 1.1 and earlier.

ccache type Use this parameter on systems which are DCE clients, to specify the type of cache to be created by kinit, or when forwarded tickets are received. DCE and Kerberos can share the cache, but some versions of DCE do not support the default cache as created by this version of Kerberos. Use a value of 1 on DCE 1.0.3a systems, and a value of 2 on DCE 1.1 systems.

3.1.2 [appdefaults]

Each tag in the [appdefaults] section names a Kerberos V5 application. The value of the tag is a subsection with relations that define the default behaviors for that application.

For example:

     [appdefaults]
         kinit = {
             forwardable = true
         }
         telnet = {
             forward = true
             encrypt = true
             autologin = true
         }

The list of specifiable options for each application may be found in that application’s man pages. The application defaults specified here are overridden by those specified in the [realms] section.

3.1.3 [realms]

Each tag in the [realms] section of the file is the name of a Kerberos realm. The value of the tag is a subsection with relations that define the properties of that particular realm. For each realm, the following tags may be specified in the realm’s subsection:

kdc The name of a host running a KDC for that realm. An optional port number (separated

from the hostname by a colon) may be included.

admin server Identifies the host where the administration server is running. Typically, this is the master Kerberos server.

application defaults Application defaults that are specific to a particular realm may be specified within that realm’s tag. Realm-specific application defaults override the global defaults specified in the [appdefaults] section.

3.1.4 [domain realm]

The [domain realm] section provides a translation from a domain name or hostname to a Kerberos realm name. The tag name can be a host name, or a domain name, where domain names are indicated by a prefix of a period (‘.’). The value of the relation is the Kerberos realm name for that particular host or domain. Host names and domain names should be in lower case.

If no translation entry applies, the host’s realm is considered to be the hostname’s domain portion converted to upper case. For example, the following [domain realm] section:

     [domain_realm]
         .mit.edu = ATHENA.MIT.EDU
         mit.edu = ATHENA.MIT.EDU
         crash.mit.edu = TEST.ATHENA.MIT.EDU
         fubar.org = FUBAR.ORG

maps crash.mit.edu into the TEST.ATHENA.MIT.EDU realm. All other hosts in the mit.edu domain will map by default to the ATHENA.MIT.EDU realm, and all hosts in the fubar.org domain will map by default into the FUBAR.ORG realm. Note the entries for the hosts mit.edu and fubar.org. Without these entries, these hosts would be mapped into the Kerberos realms ‘EDU’ and ‘ORG’, respectively.

3.1.5 [logging]

The [logging] section indicates how a particular entity is to perform its logging. The relations in this section assign one or more values to the entity name. Currently, the following entities are used:

admin server

These entries specify how the administrative server is to perform its logging.

default These entries specify how to perform logging in the absence of explicit specifications otherwise.

Values are of the following forms:

FILE=<filename> FILE:<filename>

This value causes the entity’s logging messages to go to the specified file. If the ‘=’ form is used, the file is overwritten. If the ‘:’ form is used, the file is appended to.

STDERR This value causes the entity’s logging messages to go to its standard error stream. CONSOLE

This value causes the entity’s logging messages to go to the console, if the system supports it.

DEVICE=<devicename>

This causes the entity’s logging messages to go to the specified device.

SYSLOG[:<severity>[:<facility>]] This causes the entity’s logging messages to go to the system log. The severity argument specifies the default severity of system log messages. This may be any of the following severities supported by the syslog(3) call, minus the LOG prefix: LOG EMERG, LOG ALERT, LOG CRIT, LOG ERR, LOG WARNING, LOG NOTICE, LOG INFO, and LOG DEBUG. For example, a value of ‘CRIT’ would specify LOG CRIT severity. The facility argument specifies the facility under which the messages are logged. This may be any of the following facilities supported by the syslog(3) call minus the LOG prefix: LOG KERN, LOG USER, LOG MAIL, LOG DAEMON, LOG AUTH, LOG LPR, LOG NEWS, LOG UUCP, LOG CRON, and LOG LOCAL0 through LOG LOCAL7.

If no severity is specified, the default is ERR. If no facility is specified, the default is AUTH.

In the following example, the logging messages from the KDC will go to the console and to the system log under the facility LOG DAEMON with default severity of LOG INFO; and the logging messages from the administrative server will be appended to the file /var/adm/kadmin.log and sent to the device /dev/tty04.

     [logging]
         kdc = CONSOLE
         kdc = SYSLOG:INFO:DAEMON
         admin_server = FILE:/var/adm/kadmin.log
         admin_server = DEVICE=/dev/tty04

3.1.6 [capaths]

In order to perform direct (non-hierarchical) cross-realm authentication, a database is needed to construct the authentication paths between the realms. This section defines that database.

A client will use this section to find the authentication path between its realm and the realm of the server. The server will use this section to verify the authentication path used be the client, by checking the transited field of the received ticket.

There is a tag for each participating realm, and each tag has subtags for each of the realms. The value of the subtags is an intermediate realm which may participate in the cross-realm authentication. The subtags may be repeated if there is more then one intermediate realm. A value of "." means that the two realms share keys directly, and no intermediate realms should be allowd to participate.

There are n**2 possible entries in this table, but only those entries which will be needed on the client or the server need to be present. The client needs a tag for its local realm, with subtags for all the realms of servers it will need to authenticate with. A server needs a tag for each realm of the clients it will serve.

For example, ANL.GOV, PNL.GOV, and NERSC.GOV all wish to use the ES.NET realm as an intermediate realm. ANL has a sub realm of TEST.ANL.GOV which will authenticate with NERSC.GOV but not PNL.GOV. The [capath] section for ANL.GOV systems would look like this:

[capaths]
ANL.GOV = {
    TEST.ANL.GOV = .
    PNL.GOV = ES.NET
    NERSC.GOV = ES.NET
    ES.NET = .
}
TEST.ANL.GOV = {
    ANL.GOV = .
}
PNL.GOV = {
    ANL.GOV = ES.NET
}
NERSC.GOV = {
    ANL.GOV = ES.NET
}
ES.NET = {
    ANL.GOV = .
}

The [capath] section of the configuration file used on NERSC.GOV systems would look like this:

[capaths]
NERSC.GOV = {
    ANL.GOV = ES.NET
    TEST.ANL.GOV = ES.NET
    TEST.ANL.GOV = ANL.GOV
    PNL.GOV = ES.NET
    ES.NET = .
}
ANL.GOV = {
    NERSC.GOV = ES.NET
}
PNL.GOV = {
    NERSC.GOV = ES.NET
}
ES.NET = {
    NERSC.GOV = .
}
TEST.ANL.GOV = {
    NERSC.GOV = ANL.GOV
    NERSC.GOV = ES.NET
}

In the above examples, the ordering is not important, except when the same subtag name is used more then once. The client will use this to determing the path. (It is not important to the server, since the transited field is not sorted.)

This feature is not currently supported by DCE. DCE security servers can be used with Kerberized clients and servers, but versions prior to DCE 1.1 did not fill in the transited field, and should be used with caution.

3.1.7 Sample krb5.conf File

Here is an example of a generic krb5.conf file:

[libdefaults]
ticket_lifetime = 600
default_realm = ATHENA.MIT.EDU
default_tkt_enctypes = des-cbc-crc
default_tgs_enctypes = des-cbc-crc
[realms]
ATHENA.MIT.EDU = {
    kdc = kerberos.mit.edu
    kdc = kerberos-1.mit.edu
    kdc = kerberos-2.mit.edu
    admin_server = kerberos.mit.edu
    default_domain = mit.edu
}
FUBAR.ORG = {
    kdc = kerberos.fubar.org
    kdc = kerberos-1.fubar.org
    admin_server = kerberos.fubar.org
}
[domain_realm]
.mit.edu = ATHENA.MIT.EDU
mit.edu = ATHENA.MIT.EDU

3.2 kdc.conf

The kdc.conf file contains KDC configuration information, including defaults used when issuing Kerberos tickets. Normally, you should install your kdc.conf file in the directory /usr/local/var/krb5kdc. You can override the default location by setting the environment

variable ‘KRB5_KDC_PROFILE’.

The kdc.conf file is set up in the same format as the krb5.conf file. (See Section 3.1 [krb5.conf], page 7.) The kdc.conf file may contain any or all of the following three sections:

kdcdefaults Contains default values for overall behavior of the KDC.

realms Contains subsections keyed by Kerberos realm names. Each subsection describes realm-

specific information, including where to find the Kerberos servers for that realm.

logging Contains relations which determine how Kerberos programs are to perform logging.

3.2.1 [kdcdefaults]

The following relation is defined in the [kdcdefaults] section:

kdc ports This relation lists the ports on which the Kerberos server should listen by default. This list is a comma separated list of integers. If this relation is not specified, the compiledin default is usually port 88 (the assigned Kerberos port) and port 750 (the port used by Kerberos V4).

3.2.2 [realms]

Each tag in the [realms] section of the file names a Kerberos realm. The value of the tag is a subsection where the relations in that subsection define KDC parameters for that particular realm.

For each realm, the following tags may be specified in the [realms] subsection:

acl file (String.) Location of the access control list (acl) file that kadmin uses to determine which principals are allowed which permissions on the database. The default

          is /usr/local/var/krb5kdc/kadm5.acl.

admin keytab (String.) Location of the keytab file that kadmin uses to authenticate to the database.

The default is /usr/local/var/krb5kdc/kadm5.keytab.

database name (String.) Location of the Kerberos database for this realm. The default is

/usr/local/var/krb5kdc/principal.

default principal expiration (Absolute time string.) Specifies the default expiration date of principals created in this realm.

default principal flags

(Flag string.) Specifies the default attributes of principals created in this realm.

dict file (String.) Location of the dictionary file containing strings that are not allowed as

passwords. The default is /usr/local/var/krb5kdc/kadm5.dict.

encryption type (Encryption type string.) Specifies the encryption type used for this realm. Only "des-cbc-crc" is supported at this time.

kadmind port (Port number.) Specifies the port that the kadmind daemon is to listen for this realm. The assigned port for kadmind is 749.

key stash file (String.) Specifies the location where the master key has been stored (via kdb5_util stash). The default is /usr/local/var/krb5kdc/.k5.REALM, where REALM is the Kerberos realm.

kdc ports (String.) Specifies the list of ports that the KDC is to listen to for this realm. By

default, the value of kdc ports as specified in the [kdcdefaults] section is used.

master key name

(String.) Specifies the name of the master key.

master key type (Key type string.) Specifies the master key’s key type. Only "des-cbc-crc" is supported at this time.

max life (Delta time string.) Specifes the maximum time period for which a ticket may be valid

in this realm.

max renewable life (Delta time string.) Specifies the maximum time period during which a valid ticket may be renewed in this realm.

supported enctypes List of key:salt strings. Specifies the default key/salt combinations of principals for this realm. Since only the encryption type "des-cbc-crc" is supported, you should set

this tag to ‘des-cbc-crc:normal’.

3.2.3 Sample kdc.conf File

Here’s an example of a kdc.conf file:

[kdcdefaults]
kdc_ports = 88
[realms]
ATHENA.MIT.EDU = {
    kadmind_port = 749
    max_life = 10h 0m 0s
    max_renewable_life = 7d 0h 0m 0s
    master_key_type = des-cbc-crc
    supported_enctypes = des-cbc-crc:normal
}
[logging]
kdc = FILE:/usr/local/var/krb5kdc/kdc.log
admin_server = FILE:/usr/local/var/krb5kdc/kadmin.log

4 Administrating the Kerberos Database

Your Kerberos database contains all of your realm’s Kerberos principals, their passwords, and other administrative information about each principal. For the most part, you will use the kdb5_ util program to manipulate the Kerberos database as a whole, and the kadmin program to make changes to the entries in the database. (One notable exception is that users will use the kpasswd program to change their own passwords.) The kadmin program has its own command-line interface, to which you type the database administrating commands.

Kdb5_util provides a means to create, delete, load, or dump a Kerberos database. It also includes a command to stash a copy of the master database key in a file on a KDC, so that the KDC can authenticate itself to the kadmind and krb5kdc daemons at boot time.

Kadmin provides for the maintenance of Kerberos principals, KADM5 policies, and service key tables (keytabs). It exists as both a Kerberos client, kadmin, using Kerberos authentication and an RPC, to operate securely from anywhere on the network, and as a local client, kadmin.local, intended to run directly on the KDC without Kerberos authentication. Other than the fact that the remote client uses Kerberos to authenticate the person using it, the functionalities of the two versions are identical. The local version is necessary to enable you to set up enough of the database to be able to use the remote version. It replaces the now obsolete kdb5_edit (except for database dump and load, which are provided by kdb5_util).

The remote version authenticates to the KADM5 server using the service principal kadmin/admin. If the credentials cache contains a ticket for the kadmin/admin principal, and the ‘-c ccache’ option is specified, that ticket is used to authenticate to KADM5. Otherwise, the ‘-p’ and ‘-k’ options are used to specify the client Kerberos principal name used to authenticate. Once kadmin has determined the principal name, it requests a kadmin/admin Kerberos service ticket from the KDC, and uses that service ticket to authenticate to KADM5.

4.1 Kadmin Options

You can invoke kadmin with any of the following options:

-r REALM Use REALM as the default Kerberos realm for the database.

-p principal Use the Kerberos principal principal to authenticate to Kerberos. If this option is not given, kadmin will append admin to either the primary principal name, the environment variable USER, or to the username obtained grom getpwuid, in order of preference.

-k keytab Use the keytab keytab to decrypt the KDC response instead of prompting for a password on the TTY. In this case, the principal will be ‘host/hostname’.

-c credentials cache Use credentials cache as the credentials cache. The credentials cache should contain a service ticket for the kadmin/admin service, which can be acquired with the kinit program. If this option is not specified, kadmin requests a new service ticket from the KDC, and stores it in its own temporary ccache.

-w password Use password as the password instead of prompting for one on the TTY. Note: placing the password for a Kerberos principal with administration access into a shell script can be dangerous if unauthorized users gain read access to the script.

-q query Pass query directly to kadmin. This is useful for writing scripts that pass specific queries to kadmin.

4.2 Date Format

Many of the kadmin commands take a duration or time as an argument. The date can appear in a wide variety of formats, such as:

"15 minutes"
"7 days"
"1 month"
"2 hours"
"400000 seconds"
"next year"
"this Monday"
"next Monday"
yesterday
tomorrow
now
"second Monday"
fortnight
"3/31/92 10:00:07 PST"
"January 23, 1987 10:05pm"
"22:00 GMT"

Note that if the date specification contains spaces, you must enclose it in double quotes. Note also that you cannot use a number without a unit. (I.e., “"60 seconds"” is correct, but “60” is incorrect.) All keywords are case-insensitive. The following is a list of all of the allowable keywords.

Months january, jan, february, feb, march, mar, april, apr, may, june, jun, july, jul, august, aug, september, sept, sep, october, oct, november, nov, december, dec

Days sunday, sun, monday, mon, tuesday, tues, tue, wednesday, wednes, wed, thursday, thurs, thur, thu, friday, fri, saturday, sat

Units year, month, fortnight, week, day, hour, minute, min, second, sec Relative tomorrow, yesterday, today, now, last, this, next, first, third, fourth, fifth, sixth, sev-

enth, eighth, ninth, tenth, eleventh, twelfth, ago

Time Zones kadmin recognizes abbreviations for most of the world’s time zones. A complete listing appears in Section A.2 [kadmin Time Zones], page 55.

12-hour Time Delimiters am, pm

4.3 Principals

Each entry in the Kerberos database contains a Kerberos principal (see Section 2.8 [Definitions], page 6) and the attributes and policies associated with that principal.

4.3.1 Retrieving Information About a Principal

4.3.1.1 Attributes

To retrieve a listing of the attributes and/or policies associated with a principal, use the kadmin get_principal command, which requires the “inquire” administrative privilege. The syntax is:

get principal principal

The get_principal command has the alias getprinc.

For example, suppose you wanted to view the attributes of the principals

jennifer/root@ATHENA.MIT.EDU and systest@ATHENA.MIT.EDU. You would type:
shell% kadmin
kadmin: getprinc jennifer/root

Principal: jennifer/root@ATHENA.MIT.EDU Key version: 3 Maximum life: 1 day 00:00:00 Maximum renewable life: 7 days 00:00:00 Master key version: 1 Expires: Mon Jan 18 22:14:07 EDT 2038 Password expires: Mon Sep 19 14:40:00 EDT 1996 Password last changed: Mon Jan 31 02:06:40 EDT 1996 Last modified: by joeadmin/admin@ATHENA.MIT.EDU on Wed Jul 13 18:27:08 EDT 1996 Attributes: DISALLOW FORWARDABLE, DISALLOW PROXIABLE, REQUIRES HW AUTH Salt type: DEFAULT kadmin:

The get_principal command has a -terse option, which lists the fields as a quoted, tabseparated string. For example:

     kadmin: getprinc -terse systest

systest@ATHENA.MIT.EDU 3 86400 604800 1 785926535 753241234 785900000 joeadmin/admin@ATHENA.MIT.EDU 786100034 0 0 kadmin:

4.3.1.2 Retrieving a List of Principals

To generate a listing of principals, use the kadmin list_principals command, which requires the “list” privilege. The syntax is:

list principals [expression]

where expression is a shell-style glob expression that can contain the characters ‘*’, ‘?’, ‘[’, and ‘]’. All policy names matching the expression are displayed. The list_principals command has the alias listprincs. For example:

     kadmin: listprincs test*

test3@mit.edu test2@mit.edu test1@mit.edu testuser@mit.edu kadmin:

If no expression is provided, all principals are printed.

4.3.2 Privileges

Administrative privileges for the Kerberos database are stored in the file kadm5.acl. Each line of the file contains a principal, the privileges that principal has, and optionally the target to which those permissions apply. The privileges are represented by single letters; UPPER-CASE letters represent negative permissions. The permissions are:

a allows the addition of principals or policies in the database. A disallows the addition of principals or policies in the database. d allows the deletion of principals or policies in the database. D disallows the deletion of principals or policies in the database. m allows the modification of principals or policies in the database. M disallows the modification of principals or policies in the database. c allows the changing of passwords for principals in the database. C disallows the changing of passwords for principals in the database. i allows inquiries to the database.

I disallows inquiries to the database. l allows the listing of principals or policies in the database. L disallows the listing of principals or policies in the database.

* All privileges (admcil). x All privileges (admcil); identical to “*”.

Principals in this file can include the * wildcard. Here is an example of a kadm5.acl file. Note that order is important; permissions are determined by the first matching entry.

     */admin@ATHENA.MIT.EDU  *
     joeadmin@ATHENA.MIT.EDU  ADMCIL
     joeadmin/*@ATHENA.MIT.EDU  il
     jennifer/root@ATHENA.MIT.EDU  cil  */root@ATHENA.MIT.EDU
     */*@ATHENA.MIT.EDU  i

In the above file, any principal with an admin instance has all administrative privileges. The user

joeadmin has all permissions with his admin instance, joeadmin/admin@ATHENA.MIT.EDU (matches

the first line). He has no permissions at all with his null instance, joeadmin@ATHENA.MIT.EDU (matches the second line). He has inquire and list permissions with any other instance (matches the third line). When jennifer is using her root instance, jennifer/root@ATHENA.MIT.EDU, she has change password, inquire, and list privileges for any other principal that has the instance root. Finally, any principal in the realm ATHENA.MIT.EDU (except for joeadmin@ATHENA.MIT.EDU, as mentioned above) has inquire privileges.

4.3.3 Adding or Modifying Principals

To add a principal to the database, use the kadmin add_principal command, which requires the “add” administrative privilege. This function creates the new principal and, if neither the -policy nor -clearpolicy options are specified and the policy “default” exists, assigns it that policy. The syntax is:

kadmin: add_principal [options] principal

To modify attributes of a principal, use the kadmin modify_principal command, which requires the “modify” administrative privilege. The syntax is:

kadmin: modify_principal [options] principal

add_principal has the aliases addprinc and ank^{1}. modify_principal has the alias modprinc.

The add_principal and modify_principal commands take the following switches:

-salt salttype Uses the specified salt for generating the key. The valid salt types are:

1 ank was the short form of the equivalent command using the deprecated kadmin5 database administrative tool. It has been kept • full name (aliases “v5 salt” and “normal”; this is the default)

• name only

• realm only

• no salt (alias “v4 salt”)

-clearpolicy For modify_principal, removes the current policy from a principal. For add_ principal, suppresses the automatic assignment of the policy “default”.

-expire date Sets the expiration date of the principal to date.

-pwexpire date Sets the expiration date of the password to date.

-maxlife maxlife Sets the maximum ticket life of the principal to maxlife.

-kvno number Explicity sets the key version number to number. MIT does not recommend doing this unless there is a specific reason.

-policy policy Sets the policy used by this principal. (See Section 4.4 [Policies], page 26.) With modify_principal, the current policy assigned to the principal is set or changed. With add_principal, if this option is not supplied, the -clearpolicy is not specified, and the policy “default” exists, that policy is assigned. If a principal is created with no policy, kadmin will print a warning message.

{-|+}allow postdated The “-allow postdated” option prohibits this principal from obtaining postdated tickets. “+allow postdated” clears this flag. In effect, “-allow postdated” sets the KRB5 KDB DISALLOW POSTDATED flag on the principal in the database.

{-|+}allow forwardable The “-allow forwardable” option prohibits this principal from obtaining forwardable tickets. “+allow forwardable” clears this flag. In effect, “-allow forwardable” sets the KRB5 KDB DISALLOW FORWARDABLE flag on the principal in the database.

{-|+}allow renewable The “-allow renewable” option prohibits this principal from obtaining renewable tickets. “+allow renewable” clears this flag. In effect, “-allow renewable” sets the KRB5 KDB DISALLOW RENEWABLE flag on the principal in the database.

{-|+}allow proxiable The “-allow proxiable” option prohibits this principal from obtaining proxiable tickets. “+allow proxiable” clears this flag. In effect, “-allow proxiable” sets the KRB5 KDB DISALLOW PROXIABLE flag. on the principal in the database.

{-|+}allow dup skey The “-allow dup skey” option disables user-to-user authentication for this principal by prohibiting this principal from obtaining a session key for another user. “+allow dup skey” clears this flag. In effect, “-allow dup skey” sets the KRB5 KDB DISALLOW DUP SKEY flag on the principal in the database.

{-|+}requires preauth The “+requires preauth” option requires this principal to preauthenticate before being allowed to kinit. -requires preauth clears this flag. In effect, +requires preauth sets the KRB5 KDB REQUIRES PRE AUTH flag on the principal in the database.

{-|+}requires hwauth The “+requires hwauth” flag requires the principal to preauthenticate using a hardware device before being allowed to kinit. “-requires hwauth” clears this flag. In effect, “+requires hwauth” sets the KRB5 KDB REQUIRES HW AUTH flag on the principal in the database.

{-|+}allow svr The “-allow svr” flag prohibits the issuance of service tickets for this principal. “+allow svr” clears this flag. In effect, “-allow svr” sets the KRB5 KDB DISALLOW SVR flag on the principal in the database.

{-|+}allow tgs req The “-allow tgs req” option specifies that a Ticket-Granting Service (TGS) request for a service ticket for this principal is not permitted. You will probably never need to use this option. “+allow tgs req” clears this flag. The default is “+allow tgs req”. In effect, “-allow tgs req” sets the KRB5 KDB DISALLOW TGT BASED flag on the principal in the database.

{-|+}allow tix The “-allow tix” option forbids the issuance of any tickets for this principal. “+allow tix” clears this flag. The default is “+allow tix”. In effect, “-allow tix” sets the KRB5 KDB DISALLOW ALL TIX flag on the principal in the database.

{-|+}needchange The “+needchange” option sets a flag in attributes field to force a password change; “-needchange” clears it. The default is “-needchange”. In effect, “+needchange” sets the KRB5 KDB REQUIRES PWCHANGE flag on the principal in the database.

{-|+}password changing service The “+password changing service” option sets a flag in the attributes field marking this principal as a password change service. (Again, you will probably never need to use this option.) “-password changing service” clears the flag. The default is “- password changing service”. In effect, the “+password changing service” option sets the KRB5 KDB PWCHANGE SERVICE flag on the principal in the database.

-clearpolicy policyname Removes the policy policyname from the principal (modify_principal only).

-randkey Sets the key for the principal to a random value (add_principal only). MIT recommends using this option for host keys.

-pw password Sets the key of the principal to the specified string and does not prompt for a password (add_principal only). MIT does not recommend using this option.

If you want to just use the default values, all you need to do is:

kadmin: addprinc jennifer

WARNING: no policy specified for "jennifer@ATHENA.MIT.EDU"; defaulting to no policy.

Enter password for principal jennifer@ATHENA.MIT.EDU: ⇐ Type the password. Re-enter password for principal jennifer@ATHENA.MIT.EDU: ⇐ Type it again.

Principal "jennifer@ATHENA.MIT.EDU" created. kadmin:

If, on the other hand, you want to set up an account that expires on January 1, 2000, that uses a policy called “stduser”, with a temporary password (which you want the user to change immediately), you would type the following. (Note: each line beginning with ⇒ is a continuation of the previous line.)

kadmin: addprinc david -expire "1/1/2000 12:01am EST" -policy stduser
⇒ +needchange

Enter password for principal david@ATHENA.MIT.EDU: ⇐ Type the password. Re-enter password for principal david@ATHENA.MIT.EDU: ⇐ Type it again.

Principal "david@ATHENA.MIT.EDU" created. kadmin:

If you will need cross-realm authentication, you need to add principals for the other realm’s TGT to each realm. For example, if you need to do cross-realm authentication between the realms ATHENA.MIT.EDU and FUBAR.ORG, you would need to add the principals

‘krbtgt/FUBAR.ORG@ATHENA.MIT.EDU’ and ‘krbtgt/ATHENA.MIT.EDU@FUBAR.ORG’ to both databases.

You need to be sure the passwords and the key version numbers (kvno) are the same in both databases. This may require explicitly setting the kvno with the ‘-kvno’ option.

4.3.4 Deleting Principals

To delete a principal, use the kadmin delete_principal command, which requires the “delete” administrative privilege. The syntax is:

delete principal [-force] principal

delete_principal has the alias delprinc. The -force option causes delete_principal not to

ask if you’re sure. For example:

     kadmin: delprinc jennifer

Are you sure you want to delete the principal "jennifer@ATHENA.MIT.EDU"? (yes/no): yes Principal "jennifer@ATHENA.MIT.EDU" deleted. Make sure that you have removed this principal from all ACLs before reusing. kadmin:

4.3.5 Changing Passwords

To change a principal’s password use the kadmin change_password command, which requires the “modify” administrative privilege (unless the principal is changing his/her own password). The syntax is:

change password [options] principal

The change_password option has the alias cpw. change_password takes the following options:

-salt salttype Uses the specified salt for generating the key. Salt types are the same as for the add_ principal command (see Section 4.3.3 [Adding or Modifying Principals], page 21).

-randkey Sets the key of the principal to a random value.

-pw password Sets the password to the string password. MIT does not recommend using this option.

For example:

kadmin: cpw david

Enter password for principal david@ATHENA.MIT.EDU: ⇐ Type the new password. Re-enter password for principal david@ATHENA.MIT.EDU: ⇐ Type it again.

Password for david@ATHENA.MIT.EDU changed. kadmin:

Note that change_password will not let you change the password to one that is in the principal’s password history.

4.3.6 Renaming Principals

To rename a principal, use the kadmin rename_principal command, which requires both the “add” and “delete” administrative privileges. The syntax is:

rename principal [-force] old principal new principal

The rename_principal command has the alias renprinc.

For example:

kadmin: renprinc test test0

Are you sure you want to rename the principal "test@ATHENA.MIT.EDU" to "test0@ATHENA.MIT.EDU"? (yes/no): yes Principal "test@ATHENA.MIT.EDU" renamed to "test0@ATHENA.MIT.EDU". Make sure that you have removed "test@ATHENA.MIT.EDU" from all ACLs before reusing. kadmin:

4.4 Policies

A policy is a set of rules governing passwords. Policies can dictate minimum and maximum password lifetimes, minimum number of characters and character classes a password must contain, and the number of old passwords kept in the database.

4.4.1 Retrieving Policies

To retrieve a policy, use the kadmin get_policy command, which requires the “inquire” administrative privilege. The syntax is:

get policy [-terse] policy

The get_policy command has the alias getpol. For example:

kadmin: get_policy admin

Policy: admin Maximum password life: 180 days 00:00:00 Minimum password life: 00:00:00 Minimum password length: 6 Minimum number of password character classes: 2 Number of old keys kept: 5 Reference count: 17 kadmin:

The reference count is the number of principals using that policy.

The get_policy command has a -terse option, which lists each field as a quoted, tab-separated string. For example:

kadmin: get_policy -terse admin

admin 15552000  0  6  2  5  17

kadmin:

4.4.2 Retrieving the List of Policies

You can retrieve the list of policies with the kadmin list_policies command, which requires the “list” privilege. The syntax is:

list policies [expression]

where expression is a shell-style glob expression that can contain the characters *, ?, and []. All policy names matching the expression are displayed. The list_policies command has the alias listpols. For example:

kadmin: listpols

test-pol dict-only once-a-min test-pol-nopw

kadmin: listpols t*

test-pol test-pol-nopw kadmin:

4.4.3 Adding or Modifying Policies

To add a new policy, use the kadmin add_policy command, which requires the “add” administrative privilege. The syntax is:

add policy [options] policy name

To modify attributes of a principal, use the kadmin modify_policy command, which requires the “modify” administrative privilege. The syntax is:

modify policy [options] policy name

add_policy has the alias addpol. modify_poilcy has the alias modpol.

The add_policy and modify_policy commands take the following switches:

-maxlife time Sets the maximum lifetime of a password to time.

-minlife time Sets the minimum lifetime of a password to time.

-minlength length Sets the minimum length of a password to length characters.

-minclasses number Requires at least number of character classes in a password.

-history number Sets the number of past keys kept for a principal to number.

4.4.4 Deleting Policies

To delete a policy, use the kadmin delete_policy command, which requires the “delete” administrative privilege. The syntax is:

delete policy policy name

The delete_policy command has the alias delpol. It prompts for confirmation before deletion. For example:

     kadmin: delete_policy guests

Are you sure you want to delete the policy "guests"?

(yes/no): yes

Policy "guests" deleted.

kadmin:

Note that you must cancel the policy from all principals before deleting it. The delete_policy command will fail if it is in use by any principals.

4.5 Dumping a Kerberos Database to a File

To dump a Kerberos database into a file, use the kdb5_utildump command on one of the KDCs. The syntax is:

kdb5 util dump [-old] [-b6] [-ov] [-verbose] [filename [principals...]]

The kdb5_util dump command takes the following options:

-old causes the dump to be in the Kerberos 5 Beta 5 and earlier dump format (“kdb5 edit

load dump version 2.0”).

-b6 causes the dump to be in the Kerberos 5 Beta 6 format (“kdb5 edit load dump version

3.0”).

-ov causes the dump to be in ovsec adm export format. -verbose causes the name of each principal and policy to be printed as it is dumped.

For example:

shell% kdb5_util dump dumpfile

shell%

shell% kbd5_util dump -verbose dumpfile

kadmin/admin@ATHENA.MIT.EDU krbtgt/ATHENA.MIT.EDU@ATHENA.MIT.EDU kadmin/history@ATHENA.MIT.EDU K/M@ATHENA.MIT.EDU kadmin/changepw@ATHENA.MIT.EDU shell%

If you specify which principals to dump, you must use the full principal, as in the following example. (The line beginning with ⇒ is a continuation of the previous line.):

shell% kdb5_util dump -verbose dumpfile K/M@ATHENA.MIT.EDU
⇒ kadmin/admin@ATHENA.MIT.EDU

kadmin/admin@ATHENA.MIT.EDU K/M@ATHENA.MIT.EDU shell%

Otherwise, the principals will not match those in the database and will not be dumped:

shell% kdb5_util dump -verbose dumpfile K/M kadmin/admin

shell%

If you do not specify a dump file, kdb5_util will dump the database to the standard output.

4.6 Restoring a Kerberos Database from a Dump File

To restore a Kerberos database dump from a file, use the kdb5_util load command on one of the KDCs. The syntax is:

kdb5 util load [-old] [-b6] [-ov] [-verbose] [-update]

dumpfilename dbname [admin dbname]

The kdb5_util load command takes the following options:

-old requires the dump to be in the Kerberos 5 Beta 5 and earlier dump format (“kdb5 edit

load dump version 2.0”).

-b6 requires the dump to be in the Kerberos 5 Beta 6 format (“kdb5 edit load dump version

3.0”).

-ov requires the dump to be in ovsec adm export format. -verbose causes the name of each principal and policy to be printed as it is dumped. -update causes records from the dump file to be updated in or added to the existing database.

For example:

     shell% kdb5_util load dumpfile principal

shell%

     shell% kdb5_util load -update dumpfile principal

shell% If the database file exists, and the -update flag was not given, kdb5_util will overwrite the existing database.

4.7 Creating a Stash File

A stash file allows a KDC to authenticate itself to the database utilities, such as kadmin,

kadmind, krb5kdc, and kdb5_util.

To create a stash file, use the kdb5_util stash command. The syntax is:

kdb5 util stash [-f keyfile]

For example:

     shell% kdb5_util stash

kdb5 util: Cannot find/read stored master key while reading master key kdb5 util: Warning: proceeding without master key

Enter KDC database master key: ⇐ Type the KDC database master password.

shell% If you do not specify a stash file, kdb5_util will stash the key in the file specified in your kdc.conf file.

4.8 Creating and Destroying a Kerberos Database

If you need to create a new Kerberos database, use the kdb5_util create command. The syntax is:

kdb5 util create [-s]

If you specify the ‘-s’ option, kdb5_util will stash a copy of the master key in a stash file. (See Section 4.7 [Creating a Stash File], page 30.) For example:

shell% /usr/local/sbin/kdb5_util -r ATHENA.MIT.EDU create -s

kdb5 util: No such file or directory while setting active database to ⇒ ’/usr/local/var/krb5kdc/principal’ Initializing database ’/usr/local/var/krb5kdc/principal’ for ⇒ realm ’ATHENA.MIT.EDU’, master key name ’K/M@ATHENA.MIT.EDU’ You will be prompted for the database Master Password. It is important that you NOT FORGET this password.

Enter KDC database master key: ⇐ Type the master password. Re-enter KDC database master key to verify: ⇐ Type it again.

shell% 32 Kerberos V5 System Administrator’s Guide

5 Application Servers

If you need to install the Kerberos V5 programs on an application server, please refer to the Kerberos V5 Installation Guide. Once you have installed the software, you need to add that host to the Kerberos database (see Section 4.3.3 [Adding or Modifying Principals], page 21), and generate a keytab for that host, that contains the host’s key. You also need to make sure the host’s clock is within your maximum clock skew of the KDCs.

5.1 Keytabs

A keytab is a host’s copy of its own keylist, which is analogous to a user’s password. An application server that needs to authenticate itself to the KDC has to have a keytab that contains its own principal and key. Just as it is important for users to protect their passwords, it is equally important for hosts to protect their keytabs. You should always store keytab files on local disk, and make them readable only by root, and you should never send a keytab file over a network in the clear. Ideally, you should run the kadmin command to extract a keytab on the host on which the keytab is to reside.

5.1.1 Adding Principals to Keytabs

To generate a keytab, or to add a principal to an existing keytab, use the ktadd command from kadmin, which requires the “inquire” administrative privilege. (If you use the -glob princ exp option, it also requires the “list” administrative privilege.) The syntax is:

ktadd [-k keytab] [-q] [principal | -glob princ exp] […]

The ktadd command takes the following switches:

-k keytab use keytab as the keytab file. Otherwise, ktadd will use the default keytab file

          (/etc/krb5.keytab).

-q run in quiet mode. This causes ktadd to display less verbose information.

principal | -glob principal expression add principal, or all principals matching principal expression to the keytab. The rules for principal expression are the same as for the kadmin list_principals (see Section 4.3.1.2 [Retrieving a List of Principals], page 20) command.

For example (The line beginning with ⇒ is a continuation of the previous line.):

     kadmin: ktadd host/daffodil.mit.edu@ATHENA.MIT.EDU

kadmin: Entry for principal host/daffodil.mit.edu@ATHENA.MIT.EDU with kvno 2, encryption type DES-CBC-CRC added to keytab WRFILE:/etc/krb5.keytab.

kadmin:

     kadmin: ktadd -k /usr/local/var/krb5kdc/kadmind.keytab
     ⇒ kadmin/admin kadmin/changepw

kadmin: Entry for principal kadmin/admin@ATHENA.MIT.EDU with kvno 3, encryption type DES-CBC-CRC added to keytab WRFILE:/usr/local/var/krb5kdc/kadmind.keytab.

kadmin:

5.1.2 Removing Principals from Keytabs

To remove a principal to an existing keytab, use the kadmin ktremove command. The syntax is:

ktremove [-k keytab] [-q] principal [kvno | all | old]

The ktremove command takes the following switches:

-k keytab use keytab as the keytab file. Otherwise, ktremove will use the default keytab file

          (/etc/krb5.keytab).

-q run in quiet mode. This causes ktremove to display less verbose information.

principal the principal to remove from the keytab. (Required.)

kvno remove all entries for the specified principal whose Key Version Numbers match kvno.

all remove all entries for the specified principal

old remove all entries for the specified principal except those with the highest kvno.

For example:

     kadmin: ktremove -k /usr/local/var/krb5kdc/kadmind.keytab kadmin/admin

kadmin: Entry for principal kadmin/admin with kvno 3 removed

from keytab WRFILE:/usr/local/var/krb5kdc/kadmind.keytab. kadmin:

5.2 Clock Skew

In order to prevent intruders from resetting their system clocks in order to continue to use expired tickets, Kerberos V5 is set up to reject ticket requests from any host whose clock is not within the specified maximum clock skew of the KDC (as specified in the kdc.conf file). Similarly, hosts are configured to reject responses from any KDC whose clock is not within the specified maximum clock skew of the host (as specified in the krb5.conf file). The default value for maximum clock skew is 300 seconds (five minutes).

MIT suggests that you add a line to client machines’ /etc/rc files to synchronize the machine’s clock to your KDC at boot time. On UNIX hosts, assuming you had a kdc called kerberos in your realm, this would be:

     gettime -s kerberos

If the host is not likely to be rebooted frequently, you may also want to set up a cron job that adjusts the time on a regular basis.

5.3 Getting DNS Information Correct

Several aspects of Kerberos rely on name service. In order for Kerberos to provide its high level of security, it is less forgiving of name service problems than some other parts of your network. It is important that your Domain Name System (DNS) entries and your hosts have the correct information.

Each host’s canonical name must be the fully-qualified host name (including the domain), and each host’s IP address must reverse-resolve to the canonical name.

Other than the localhost entry, make all entries in each machine’s /etc/hosts file in the following form:

     IP address      fully-qualified hostname        aliases

Here is a sample /etc/hosts file:

     # this is a comment
     127.0.0.1       localhost localhost@mit.edu
     10.0.0.6       daffodil.mit.edu trillium wake-robin

Additionally, on Solaris machines, you need to be sure the “hosts” entry in the file /etc/nsswitch.conf includes the source “dns” as well as “file”.

Finally, each host’s keytab file must include a host/key pair for the host’s canonical name. You can list the keys in a keytab file by issuing the command klist -k. For example:

     viola# klist -k
     Keytab name: /etc/krb5.keytab
     KVNO Principal
     ---- ------------------------------------------------------------
        1 host/daffodil.mit.edu@ATHENA.MIT.EDU

If you telnet to the host with a fresh credentials cache (ticket file), and then klist, the host’s service principal should be host/fully-qualified-hostname@REALM NAME.

5.4 Configuring Your Firewall to Work With Kerberos V5

If you need off-site users to be able to get Kerberos tickets in your realm, they must be able to get to your KDC. This requires either that you have a slave KDC outside your firewall, or you configure your firewall to allow UDP requests into to at least one of your KDCs, on whichever port the KDC is running. (The default is port 88; other ports may be specified in the KDC’s kdc.conf file.) Similarly, if you need off-site users to be able to change their passwords in your realm, they must be able to get to your Kerberos admin server. The default port for the admin server is 749.

If your on-site users inside your firewall will need to get to KDCs in other realms, you will also need to configure your firewall to allow outgoing TCP and UDP requests to port 88. Additionally, if they will need to get to any Kerberos V4 KDCs, you may also need to allow TCP and UDP requests to port 750. If your on-site users inside your firewall will need to get to Kerberos admin servers in other realms, you will also need to allow outgoing TCP and UDP requests to port 749.

If any of your KDCs is outside your firewall, you will need to allow kprop requests to get through to the remote KDC. Kprop uses the krb5 prop service on port 754 (tcp).

If you need your off-site users to have access to machines inside your firewall, you need to allow TCP connections from their off-site hosts on the appropriate ports for the programs they will be using. The following lines from /etc/services show the default port numbers for the Kerberos V5 programs:

     ftp           21/tcp           # Kerberos ftp and telnet use the
     telnet        23/tcp           # default ports
     kerberos      88/udp    kdc    # Kerberos V5 KDC
     kerberos      88/tcp    kdc    # Kerberos V5 KDC
     klogin        543/tcp          # Kerberos authenticated rlogin
     kshell        544/tcp   cmd    # and remote shell
     kerberos-adm  749/tcp          # Kerberos 5 admin/changepw
     kerberos-adm  749/udp          # Kerberos 5 admin/changepw
     krb5_prop     754/tcp          # Kerberos slave propagation
     eklogin       2105/tcp         # Kerberos auth. & encrypted rlogin
     krb524        4444/tcp         # Kerberos 5 to 4 ticket translator

By default, Kerberos V5 telnet and ftp use the same ports as the standard telnet and ftp programs, so if you already allow telnet and ftp connections through your firewall, the Kerberos V5 versions will get through as well. If you do not already allow telnet and ftp connections through your firewall, but need your users to be able to use Kerberos V5 telnet and ftp, you can either allow ftp and telnet connections on the standard ports, or switch these programs to non-default port numbers and allow ftp and telnet connections on those ports to get through.

Kerberos V5 rlogin uses the klogin service, which by default uses port 543. Encrypted Kerberos V5 rlogin uses uses the eklogin service, which by default uses port 2105.

Kerberos V5 rsh uses the kshell service, which by default uses port 544. However, the server must be able to make a TCP connection from the kshell port to an arbitrary port on the client, so if your users are to be able to use rsh from outside your firewall, the server they connect to must be able to send outgoing packets to arbitrary port numbers. Similarly, if your users need to run rsh from inside your firewall to hosts outside your firewall, the outside server needs to be able to connect to an arbitrary port on the machine inside your firewall. Because Kerberos V5 rcp uses rsh, the same issues apply. If you need to use rsh (or rcp) through your firewall and are concerned with the security implications of allowing connections to arbitrary ports, MIT suggests that you have rules that specifically name these applications and, if possible, list the allowed hosts.

A reasonably good cookbook for configuring firewalls is available by FTP from

ftp.livingston.com, in the location: /pub/firewall/firewall-1.1.ps.Z. The book UNIX

System Security, by David Curry, is also a good starting point.

38 Kerberos V5 System Administrator’s Guide

6 Backups of Secure Hosts

When you back up a secure host, you should exclude the host’s keytab file from the backup. If someone obtained a copy of the keytab from a backup, that person could make any host masquerade as the host whose keytab was compromised. This could be particularly dangerous if the compromised keytab was from one of your KDCs. If the machine has a disk crash and the keytab file is lost, it is easy to generate another keytab file. (See Section 5.1.1 [Adding Principals to Keytabs], page 33.) If you are unable to exclude particular files from backups, you should ensure that the backups are kept as secure as the host’s root password.

6.1 Backing Up the Kerberos Database

As with any file, it is possible that your Kerberos database could become corrupted. If this happens on one of the slave KDCs, you might never notice, since the next automatic propagation of the database would install a fresh copy. However, if it happens to the master KDC, the corrupted database would be propagated to all of the slaves during the next propagation. For this reason, MIT recommends that you back up your Kerberos database regularly. Because the master KDC is continuously dumping the database to a file in order to propagate it to the slave KDCs, it is a simple matter to have a cron job periodically copy the dump file to a secure machine elsewhere on your network. (Of course, it is important to make the host where these backups are stored as secure as your KDCs, and to encrypt its transmission across your network.) Then if your database becomes corrupted, you can load the most recent dump onto the master KDC. (See Section 4.6 [Restoring a Kerberos Database from a Dump File], page 30.)

40 Kerberos V5 System Administrator’s Guide

7 Bug Reporting

In any complex software, there will be bugs. If you have successfully built and installed Kerberos V5, please use the krb5-send-pr program to fill out a Problem Report.

Bug reports that include proposed fixes are especially welcome. If you do include fixes, please send them using either context diffs or unified diffs (using ‘diff -c’ or ‘diff -u’, respectively).

The krb5-send-pr program is installed in the directory /usr/local/sbin.

The krb5-send-pr program enters the problem report into our Problem Report Management System (PRMS), which automatically assigns it to the engineer best able to help you with problems in the assigned category.

The krb5-send-pr program will try to intelligently fill in as many fields as it can. You need to choose the category, class, severity, and priority of the problem, as well as giving us as much information as you can about its exact nature.

The PR category will be one of:

     krb5-admin   krb5-appl    krb5-build   krb5-clients
     krb5-doc     krb5-kdc     krb5-libs    krb5-misc
     pty          telnet       test

Choose the category that best describes the area under which your problem falls.

The class can be sw-bug, doc-bug, change-request, or support. The first two are exactly as their names imply. Use change-request when the software is behaving according to specifications, but you want to request changes in some feature or behavior. The support class is intended for more general questions about building or using Kerberos V5.

The severity of the problem indicates the problem’s impact on the usability of Kerberos V5. If a problem is critical, that means the product, component or concept is completely non-operational, or some essential functionality is missing, and no workaround is known. A serious problem is one in which the product, component or concept is not working properly or significant functionality is missing. Problems that would otherwise be considered critical are rated serious when a workaround is known. A non-critical problem is one that is indeed a problem, but one that is having a minimal effect on your ability to use Kerberos V5. E.g., The product, component or concept is working in general, but lacks features, has irritating behavior, does something wrong, or doesn’t match its documentation. The default severity is serious.

The priority indicates how urgent this particular problem is in relation to your work. Note that low priority does not imply low importance. A priority of high means a solution is needed as soon as possible. A priority of medium means the problem should be solved no later than the next release. A priority of low means the problem should be solved in a future release, but it is not important to your work how soon this happens. The default priority is medium.

Note that a given severity does not necessarily imply a given priority. For example, a non-critical problem might still have a high priority if you are faced with a hard deadline. Conversely, a serious problem might have a low priority if the feature it is disabling is one that you do not need.

It is important that you fill in the release field and tell us what changes you have made, if any.

Bug reports that include proposed fixes are especially welcome. If you include proposed fixes, please send them using either context diffs (‘diff -c’) or unified diffs (‘diff -u’).

A sample filled-out form from a company named “Toasters, Inc.” might look like this:

To: krb5-bugs@mit.edu
Subject: misspelled "Kerberos" in title of installation guide
From: jcb
Reply-To: jcb
Cc:
X-send-pr-version: 3.99

>Submitter-Id:  mit
>Originator:  Jeffrey C. Gilman Bigler
>Organization:
mit
>Confidential:  no
>Synopsis:  Misspelled "Kerberos" in title of installation guide
>Severity:  non-critical
>Priority:  low
>Category:  krb5-doc
>Class:  doc-bug
>Release:  1.0-development
>Environment:
<machine, os, target, libraries (multiple lines)>
System: ULTRIX imbrium 4.2 0 RISC
Machine: mips
>Description:
        Misspelled "Kerberos" in title of "Kerboros V5 Installation Guide"
>How-To-Repeat:
        N/A
>Fix:
        Correct the spelling.

If the krb5-send-pr program does not work for you, or if you did not get far enough in the process to have an installed and working krb5-send-pr, you can generate your own form, using the above as an example.

44 Kerberos V5 System Administrator’s Guide

Appendix A Appendix

A.1 Kerberos Error Messages

A.1.1 Kerberos V5 Library Error Codes

This is the Kerberos v5 library error code table. Protocol error codes are ERROR TABLE BASE krb5 + the protocol error code number; other error codes start at ERROR TABLE BASE krb5 + 128.

0. KRB5KDC ERR NONE: No error

1. KRB5KDC ERR NAME EXP: Client’s entry in database has expired

2. KRB5KDC ERR SERVICE EXP: Server’s entry in database has expired

3. KRB5KDC ERR BAD PVNO: Requested protocol version not supported

4. KRB5KDC ERR C OLD MAST KVNO: Client’s key is encrypted in an old master key

5. KRB5KDC ERR S OLD MAST KVNO: Server’s key is encrypted in an old master key

6. KRB5KDC ERR C PRINCIPAL UNKNOWN: Client not found in Kerberos database

7. KRB5KDC ERR S PRINCIPAL UNKNOWN: Server not found in Kerberos database

8. KRB5KDC ERR PRINCIPAL NOT UNIQUE: Principal has multiple entries in Kerberos database

9. KRB5KDC ERR NULL KEY: Client or server has a null key

10. KRB5KDC ERR CANNOT POSTDATE: Ticket is ineligible for postdating

11. KRB5KDC ERR NEVER VALID: Requested effective lifetime is negative or too short

12. KRB5KDC ERR POLICY: KDC policy rejects request

13. KRB5KDC ERR BADOPTION: KDC can’t fulfill requested option

14. KRB5KDC ERR ETYPE NOSUPP: KDC has no support for encryption type

15. KRB5KDC ERR SUMTYPE NOSUPP: KDC has no support for checksum type

16. KRB5KDC ERR PADATA TYPE NOSUPP: KDC has no support for padata type

17. KRB5KDC ERR TRTYPE NOSUPP: KDC has no support for transited type

18. KRB5KDC ERR CLIENT REVOKED: Clients credentials have been revoked

19. KRB5KDC ERR SERVICE REVOKED: Credentials for server have been revoked

20. KRB5KDC ERR TGT REVOKED: TGT has been revoked

21. KRB5KDC ERR CLIENT NOTYET: Client not yet valid - try again later

22. KRB5KDC ERR SERVICE NOTYET: Server not yet valid - try again later

23. KRB5KDC ERR KEY EXP: Password has expired 24. KRB5KDC ERR PREAUTH FAILED: Preauthentication failed

25. KRB5KDC ERR PREAUTH REQUIRED: Additional pre-authentication required

26. KRB5KDC ERR SERVER NOMATCH: Requested server and ticket don’t match

27. KRB5PLACEHOLD 27: KRB5 error code 27

28. KRB5PLACEHOLD 28: KRB5 error code 28

29. KRB5PLACEHOLD 29: KRB5 error code 29

30. KRB5PLACEHOLD 30: KRB5 error code 30

31. KRB5KRB AP ERR BAD INTEGRITY: Decrypt integrity check failed

32. KRB5KRB AP ERR TKT EXPIRED: Ticket expired

33. KRB5KRB AP ERR TKT NYV: Ticket not yet valid

34. KRB5KRB AP ERR REPEAT: Request is a replay

35. KRB5KRB AP ERR NOT US: The ticket isn’t for us

36. KRB5KRB AP ERR BADMATCH: Ticket/authenticator don’t match

37. KRB5KRB AP ERR SKEW: Clock skew too great

38. KRB5KRB AP ERR BADADDR: Incorrect net address

39. KRB5KRB AP ERR BADVERSION: Protocol version mismatch

40. KRB5KRB AP ERR MSG TYPE: Invalid message type

41. KRB5KRB AP ERR MODIFIED: Message stream modified

42. KRB5KRB AP ERR BADORDER: Message out of order

43. KRB5KRB AP ERR ILL CR TKT: Illegal cross-realm ticket

44. KRB5KRB AP ERR BADKEYVER: Key version is not available

45. KRB5KRB AP ERR NOKEY: Service key not available

46. KRB5KRB AP ERR MUT FAIL: Mutual authentication failed

47. KRB5KRB AP ERR BADDIRECTION: Incorrect message direction

48. KRB5KRB AP ERR METHOD: Alternative authentication method required

49. KRB5KRB AP ERR BADSEQ: Incorrect sequence number in message

50. KRB5KRB AP ERR INAPP CKSUM: Inappropriate type of checksum in message

51. KRB5PLACEHOLD 51: KRB5 error code 51

52. KRB5PLACEHOLD 52: KRB5 error code 52

53. KRB5PLACEHOLD 53: KRB5 error code 53

54. KRB5PLACEHOLD 54: KRB5 error code 54

55. KRB5PLACEHOLD 55: KRB5 error code 55

56. KRB5PLACEHOLD 56: KRB5 error code 56

57. KRB5PLACEHOLD 57: KRB5 error code 57 58. KRB5PLACEHOLD 58: KRB5 error code 58

59. KRB5PLACEHOLD 59: KRB5 error code 59

60. KRB5KRB ERR GENERIC: Generic error (see e-text)

61. KRB5KRB ERR FIELD TOOLONG: Field is too long for this implementation

62. KRB5PLACEHOLD 62: KRB5 error code 62

63. KRB5PLACEHOLD 63: KRB5 error code 63

64. KRB5PLACEHOLD 64: KRB5 error code 64

65. KRB5PLACEHOLD 65: KRB5 error code 65

66. KRB5PLACEHOLD 66: KRB5 error code 66

67. KRB5PLACEHOLD 67: KRB5 error code 67

68. KRB5PLACEHOLD 68: KRB5 error code 68

69. KRB5PLACEHOLD 69: KRB5 error code 69

70. KRB5PLACEHOLD 70: KRB5 error code 70

71. KRB5PLACEHOLD 71: KRB5 error code 71

72. KRB5PLACEHOLD 72: KRB5 error code 72

73. KRB5PLACEHOLD 73: KRB5 error code 73

74. KRB5PLACEHOLD 74: KRB5 error code 74

75. KRB5PLACEHOLD 75: KRB5 error code 75

76. KRB5PLACEHOLD 76: KRB5 error code 76

77. KRB5PLACEHOLD 77: KRB5 error code 77

78. KRB5PLACEHOLD 78: KRB5 error code 78

79. KRB5PLACEHOLD 79: KRB5 error code 79

80. KRB5PLACEHOLD 80: KRB5 error code 80

81. KRB5PLACEHOLD 81: KRB5 error code 81

82. KRB5PLACEHOLD 82: KRB5 error code 82

83. KRB5PLACEHOLD 83: KRB5 error code 83

84. KRB5PLACEHOLD 84: KRB5 error code 84

85. KRB5PLACEHOLD 85: KRB5 error code 85

86. KRB5PLACEHOLD 86: KRB5 error code 86

87. KRB5PLACEHOLD 87: KRB5 error code 87

88. KRB5PLACEHOLD 88: KRB5 error code 88

89. KRB5PLACEHOLD 89: KRB5 error code 89

90. KRB5PLACEHOLD 90: KRB5 error code 90

91. KRB5PLACEHOLD 91: KRB5 error code 91 92. KRB5PLACEHOLD 92: KRB5 error code 92

93. KRB5PLACEHOLD 93: KRB5 error code 93

94. KRB5PLACEHOLD 94: KRB5 error code 94

95. KRB5PLACEHOLD 95: KRB5 error code 95

96. KRB5PLACEHOLD 96: KRB5 error code 96

97. KRB5PLACEHOLD 97: KRB5 error code 97

98. KRB5PLACEHOLD 98: KRB5 error code 98

99. KRB5PLACEHOLD 99: KRB5 error code 99

100. KRB5PLACEHOLD 100: KRB5 error code 100

101. KRB5PLACEHOLD 101: KRB5 error code 101

102. KRB5PLACEHOLD 102: KRB5 error code 102

103. KRB5PLACEHOLD 103: KRB5 error code 103

104. KRB5PLACEHOLD 104: KRB5 error code 104

105. KRB5PLACEHOLD 105: KRB5 error code 105

106. KRB5PLACEHOLD 106: KRB5 error code 106

107. KRB5PLACEHOLD 107: KRB5 error code 107

108. KRB5PLACEHOLD 108: KRB5 error code 108

109. KRB5PLACEHOLD 109: KRB5 error code 109

110. KRB5PLACEHOLD 110: KRB5 error code 110

111. KRB5PLACEHOLD 111: KRB5 error code 111

112. + KRB5PLACEHOLD 112: KRB5 error code 112

113. KRB5PLACEHOLD 113: KRB5 error code 113

114. KRB5PLACEHOLD 114: KRB5 error code 114

115. KRB5PLACEHOLD 115: KRB5 error code 115

116. KRB5PLACEHOLD 116: KRB5 error code 116

117. KRB5PLACEHOLD 117: KRB5 error code 117

118. KRB5PLACEHOLD 118: KRB5 error code 118

119. KRB5PLACEHOLD 119: KRB5 error code 119

120. KRB5PLACEHOLD 120: KRB5 error code 120

121. KRB5PLACEHOLD 121: KRB5 error code 121

122. KRB5PLACEHOLD 122: KRB5 error code 122

123. KRB5PLACEHOLD 123: KRB5 error code 123

124. KRB5PLACEHOLD 124: KRB5 error code 124

125. KRB5PLACEHOLD 125: KRB5 error code 125 126. KRB5PLACEHOLD 126: KRB5 error code 126

127. KRB5PLACEHOLD 127: KRB5 error code 127

128. KRB5 ERR RCSID: $Id:admin.dvi,v 1.1.1.3 1999/05/21 21:17:44danwExp $

129. KRB5 LIBOS BADLOCKFLAG: Invalid flag for file lock mode

130. KRB5 LIBOS CANTREADPWD: Cannot read password

131. KRB5 LIBOS BADPWDMATCH: Password mismatch

132. KRB5 LIBOS PWDINTR: Password read interrupted

133. KRB5 PARSE ILLCHAR: Illegal character in component name

134. KRB5 PARSE MALFORMED: Malformed representation of principal

135. KRB5 CONFIG CANTOPEN: Can’t open/find configuration file

136. KRB5 CONFIG BADFORMAT: Improper format of configuration file

137. KRB5 CONFIG NOTENUFSPACE: Insufficient space to return complete information

138. KRB5 BADMSGTYPE: Invalid message type specified for encoding

139. KRB5 CC BADNAME: Credential cache name malformed

140. KRB5 CC UNKNOWN TYPE: Unknown credential cache type

141. KRB5 CC NOTFOUND: Matching credential not found

142. KRB5 CC END: End of credential cache reached

143. KRB5 NO TKT SUPPLIED: Request did not supply a ticket

144. KRB5KRB AP WRONG PRINC: Wrong principal in request

145. KRB5KRB AP ERR TKT INVALID: Ticket has invalid flag set

146. KRB5 PRINC NOMATCH: Requested principal and ticket don’t match

147. KRB5 KDCREP MODIFIED: KDC reply did not match expectations

148. KRB5 KDCREP SKEW: Clock skew too great in KDC reply

149. KRB5 IN TKT REALM MISMATCH: Client/server realm mismatch in initial ticket request 150. KRB5 PROG ETYPE NOSUPP: Program lacks support for encryption type

151. KRB5 PROG KEYTYPE NOSUPP: Program lacks support for key type

152. KRB5 WRONG ETYPE: Requested encryption type not used in message

153. KRB5 PROG SUMTYPE NOSUPP: Program lacks support for checksum type

154. KRB5 REALM UNKNOWN: Cannot find KDC for requested realm

155. KRB5 SERVICE UNKNOWN: Kerberos service unknown

156. KRB5 KDC UNREACH: Cannot contact any KDC for requested realm

157. KRB5 NO LOCALNAME: No local name found for principal name

158. KRB5 MUTUAL FAILED: Mutual authentication failed

159. KRB5 RC TYPE EXISTS: Replay cache type is already registered 160. KRB5 RC MALLOC: No more memory to allocate (in replay cache code)

161. KRB5 RC TYPE NOTFOUND: Replay cache type is unknown

162. KRB5 RC UNKNOWN: Generic unknown RC error

163. KRB5 RC REPLAY: Message is a replay

164. KRB5 RC IO: Replay I/O operation failed XXX

165. KRB5 RC NOIO: Replay cache type does not support non-volatile storage

166. KRB5 RC PARSE: Replay cache name parse/format error

167. KRB5 RC IO EOF: End-of-file on replay cache I/O

168. KRB5 RC IO MALLOC: No more memory to allocate (in replay cache I/O code)

169. KRB5 RC IO PERM: Permission denied in replay cache code

170. KRB5 RC IO IO: I/O error in replay cache i/o code

171. KRB5 RC IO UNKNOWN: Generic unknown RC/IO error

172. KRB5 RC IO SPACE: Insufficient system space to store replay information

173. KRB5 TRANS CANTOPEN: Can’t open/find realm translation file

174. KRB5 TRANS BADFORMAT: Improper format of realm translation file

175. KRB5 LNAME CANTOPEN: Can’t open/find lname translation database

176. KRB5 LNAME NOTRANS: No translation available for requested principal

177. KRB5 LNAME BADFORMAT: Improper format of translation database entry

178. KRB5 CRYPTO INTERNAL: Cryptosystem internal error

179. KRB5 KT BADNAME: Key table name malformed

180. KRB5 KT UNKNOWN TYPE: Unknown Key table type

181. KRB5 KT NOTFOUND: Key table entry not found

182. KRB5 KT END: End of key table reached

183. KRB5 KT NOWRITE: Cannot write to specified key table

184. KRB5 KT IOERR: Error writing to key table

185. KRB5 NO TKT IN RLM: Cannot find ticket for requested realm

186. KRB5DES BAD KEYPAR: DES key has bad parity

187. KRB5DES WEAK KEY: DES key is a weak key

188. KRB5 BAD ENCTYPE: Bad encryption type

189. KRB5 BAD KEYSIZE: Key size is incompatible with encryption type

190. KRB5 BAD MSIZE: Message size is incompatible with encryption type

191. KRB5 CC TYPE EXISTS: Credentials cache type is already registered.

192. KRB5 KT TYPE EXISTS: Key table type is already registered.

193. KRB5 CC IO: Credentials cache I/O operation failed XXX 194. KRB5 FCC PERM: Credentials cache file permissions incorrect

195. KRB5 FCC NOFILE: No credentials cache file found

196. KRB5 FCC INTERNAL: Internal file credentials cache error

197. KRB5 CC WRITE: Error writing to credentials cache file

198. KRB5 CC NOMEM: No more memory to allocate (in credentials cache code)

199. KRB5 CC FORMAT: Bad format in credentials cache

200. KRB5 INVALID FLAGS: Invalid KDC option combination (library internal error) [for dual tgt library calls]

201. KRB5 NO 2ND TKT: Request missing second ticket [for dual tgt library calls]

202. KRB5 NOCREDS SUPPLIED: No credentials supplied to library routine

203. KRB5 SENDAUTH BADAUTHVERS: Bad sendauth version was sent

204. KRB5 SENDAUTH BADAPPLVERS: Bad application version was sent (via sendauth)

205. KRB5 SENDAUTH BADRESPONSE: Bad response (during sendauth exchange)

206. KRB5 SENDAUTH REJECTED: Server rejected authentication (during sendauth exchange)

207. KRB5 PREAUTH BAD TYPE: Unsupported preauthentication type

208. KRB5 PREAUTH NO KEY: Required preauthentication key not supplied

209. KRB5 PREAUTH FAILED: Generic preauthentication failure

210. KRB5 RCACHE BADVNO: Unsupported replay cache format version number

211. KRB5 CCACHE BADVNO: Unsupported credentials cache format version number

212. KRB5 KEYTAB BADVNO: Unsupported key table format version number

213. KRB5 PROG ATYPE NOSUPP: Program lacks support for address type

214. KRB5 RC REQUIRED: Message replay detection requires rcache parameter

215. KRB5 ERR BAD HOSTNAME: Hostname cannot be canonicalized

216. KRB5 ERR HOST REALM UNKNOWN: Cannot determine realm for host

217. KRB5 SNAME UNSUPP NAMETYPE: Conversion to service principal undefined for name type

218. KRB5KRB AP ERR V4 REPLY: Initial Ticket response appears to be Version 4 error

219. KRB5 REALM CANT RESOLVE: Cannot resolve KDC for requested realm

220. KRB5 TKT NOT FORWARDABLE: Requesting ticket can’t get forwardable tickets

221. KRB5 FWD BAD PRINCIPAL: Bad principal name while trying to forward credentials

222. KRB5 GET IN TKT LOOP: Looping detected inside krb5 get in tkt

223. KRB5 CONFIG NODEFREALM: Configuration file does not specify default realm

224. KRB5 SAM UNSUPPORTED: Bad SAM flags in obtain sam padata

A.1.2 Kerberos V5 Database Library Error Codes

This is the Kerberos v5 database library error code table.

0. KRB5 KDB RCSID: $Id:admin.dvi,v 1.1.1.3 1999/05/21 21:17:44danwExp $

1. KRB5 KDB INUSE: Entry already exists in database

2. KRB5 KDB UK SERROR: Database store error

3. KRB5 KDB UK RERROR: Database read error

4. KRB5 KDB UNAUTH: Insufficient access to perform requested operation

5. KRB5 KDB NOENTRY: No such entry in the database

6. KRB5 KDB ILL WILDCARD: Illegal use of wildcard

7. KRB5 KDB DB INUSE: Database is locked or in use–try again later

8. KRB5 KDB DB CHANGED: Database was modified during read

9. KRB5 KDB TRUNCATED RECORD: Database record is incomplete or corrupted

10. KRB5 KDB RECURSIVELOCK: Attempt to lock database twice

11. KRB5 KDB NOTLOCKED: Attempt to unlock database when not locked

12. KRB5 KDB BADLOCKMODE: Invalid kdb lock mode

13. KRB5 KDB DBNOTINITED: Database has not been initialized

14. KRB5 KDB DBINITED: Database has already been initialized

15. KRB5 KDB ILLDIRECTION: Bad direction for converting keys

16. KRB5 KDB NOMASTERKEY: Cannot find master key record in database

17. KRB5 KDB BADMASTERKEY: Master key does not match database

18. KRB5 KDB INVALIDKEYSIZE: Key size in database is invalid

19. KRB5 KDB CANTREAD STORED: Cannot find/read stored master key

20. KRB5 KDB BADSTORED MKEY: Stored master key is corrupted

21. KRB5 KDB CANTLOCK DB: Insufficient access to lock database

22. KRB5 KDB DB CORRUPT: Database format error

23. KRB5 KDB BAD VERSION: Unsupported version in database entry

24. KRB5 KDB BAD SALTTYPE: Unsupported salt type

25. KRB5 KDB BAD ENCTYPE: Unsupported encryption type

A.1.3 Kerberos V5 Magic Numbers Error Codes

This is the Kerberos v5 magic numbers error code table.

0. KV5M NONE: Kerberos V5 magic number table

1. KV5M PRINCIPAL: Bad magic number for krb5 principal structure 2. KV5M DATA: Bad magic number for krb5 data structure

3. KV5M KEYBLOCK: Bad magic number for krb5 keyblock structure

4. KV5M CHECKSUM: Bad magic number for krb5 checksum structure

5. KV5M ENCRYPT BLOCK: Bad magic number for krb5 encrypt block structure

6. KV5M ENC DATA: Bad magic number for krb5 enc data structure

7. KV5M CRYPTOSYSTEM ENTRY: Bad magic number for krb5 cryptosystem entry structure 8. KV5M CS TABLE ENTRY: Bad magic number for krb5 cs table entry structure

9. KV5M CHECKSUM ENTRY: Bad magic number for krb5 checksum entry structure

10. KV5M AUTHDATA: Bad magic number for krb5 authdata structure

11. KV5M TRANSITED: Bad magic number for krb5 transited structure

12. KV5M ENC TKT PART: Bad magic number for krb5 enc tkt part structure

13. KV5M TICKET: Bad magic number for krb5 ticket structure

14. KV5M AUTHENTICATOR: Bad magic number for krb5 authenticator structure

15. KV5M TKT AUTHENT: Bad magic number for krb5 tkt authent structure

16. KV5M CREDS: Bad magic number for krb5 creds structure

17. KV5M LAST REQ ENTRY: Bad magic number for krb5 last req entry structure

18. KV5M PA DATA: Bad magic number for krb5 pa data structure

19. KV5M KDC REQ: Bad magic number for krb5 kdc req structure

20. KV5M ENC KDC REP PART: Bad magic number for krb5 enc kdc rep part structure

21. KV5M KDC REP: Bad magic number for krb5 kdc rep structure

22. KV5M ERROR: Bad magic number for krb5 error structure

23. KV5M AP REQ: Bad magic number for krb5 ap req structure

24. KV5M AP REP: Bad magic number for krb5 ap rep structure

25. KV5M AP REP ENC PART: Bad magic number for krb5 ap rep enc part structure

26. KV5M RESPONSE: Bad magic number for krb5 response structure

27. KV5M SAFE: Bad magic number for krb5 safe structure

28. KV5M PRIV: Bad magic number for krb5 priv structure

29. KV5M PRIV ENC PART: Bad magic number for krb5 priv enc part structure

30. KV5M CRED: Bad magic number for krb5 cred structure

31. KV5M CRED INFO: Bad magic number for krb5 cred info structure

32. KV5M CRED ENC PART: Bad magic number for krb5 cred enc part structure

33. KV5M PWD DATA: Bad magic number for krb5 pwd data structure

34. KV5M ADDRESS: Bad magic number for krb5 address structure 35. KV5M KEYTAB ENTRY: Bad magic number for krb5 keytab entry structure

36. KV5M CONTEXT: Bad magic number for krb5 context structure

37. KV5M OS CONTEXT: Bad magic number for krb5 os context structure

38. KV5M ALT METHOD: Bad magic number for krb5 alt method structure

39. KV5M ETYPE INFO ENTRY: Bad magic number for krb5 etype info entry structure

40. KV5M DB CONTEXT: Bad magic number for krb5 db context structure

41. KV5M AUTH CONTEXT: Bad magic number for krb5 auth context structure

42. KV5M KEYTAB: Bad magic number for krb5 keytab structure

43. KV5M RCACHE: Bad magic number for krb5 rcache structure

44. KV5M CCACHE: Bad magic number for krb5 ccache structure

45. KV5M PREAUTH OPS: Bad magic number for krb5 preauth ops

46. KV5M SAM CHALLENGE: Bad magic number for krb5 sam challenge

47. KV5M SAM KEY: Bad magic number for krb5 sam key

48. KV5M ENC SAM RESPONSE ENC: Bad magic number for krb5 enc sam response enc

49. KV5M SAM RESPONSE: Bad magic number for krb5 sam response

50. KV5M PREDICTED SAM RESPONSE: Bad magic number for krb5 predicted sam response 51. KV5M PASSWD PHRASE ELEMENT: Bad magic number for passwd phrase element

A.1.4 ASN.1 Error Codes

0. ASN1 BAD TIMEFORMAT: ASN.1 failed call to system time library

1. ASN1 MISSING FIELD: ASN.1 structure is missing a required field

2. ASN1 MISPLACED FIELD: ASN.1 unexpected field number

3. ASN1 TYPE MISMATCH: ASN.1 type numbers are inconsistent

4. ASN1 OVERFLOW: ASN.1 value too large

5. ASN1 OVERRUN: ASN.1 encoding ended unexpectedly

6. ASN1 BAD ID: ASN.1 identifier doesn’t match expected value

7. ASN1 BAD LENGTH: ASN.1 length doesn’t match expected value

8. ASN1 BAD FORMAT: ASN.1 badly-formatted encoding

9. ASN1 PARSE ERROR: ASN.1 parse error

A.1.5 GSSAPI Error Codes

Generic GSSAPI Errors:

0. G BAD SERVICE NAME: No in SERVICE-NAME name string

1. G BAD STRING UID: STRING-UID-NAME contains nondigits

2. G NOUSER: UID does not resolve to username

3. G VALIDATE FAILED: Validation error

4. G BUFFER ALLOC: Couldn’t allocate gss buffer t data

5. G BAD MSG CTX: Message context invalid

6. G WRONG SIZE: Buffer is the wrong size

7. G BAD USAGE: Credential usage type is unknown

8. G UNKNOWN QOP: Unknown quality of protection specified

9. G BAD HOSTNAME: Hostname in SERVICE-NAME string could not be canonicalized

Kerberos 5 GSSAPI Errors:

0. KG CCACHE NOMATCH: Principal in credential cache does not match desired name

1. KG KEYTAB NOMATCH: No principal in keytab matches desired name

2. KG TGT MISSING: Credential cache has no TGT

3. KG NO SUBKEY: Authenticator has no subkey

4. KG CONTEXT ESTABLISHED: Context is already fully established

5. KG BAD SIGN TYPE: Unknown signature type in token

6. KG BAD LENGTH: Invalid field length in token

7. KG CTX INCOMPLETE: Attempt to use incomplete security context

8. KG CONTEXT: Bad magic number for krb5 gss ctx id t

9. KG CRED: Bad magic number for krb5 gss cred id t

10. KG ENC DESC: Bad magic number for krb5 gss enc desc

A.2 kadmin Time Zones

This is a complete listing of the time zones recognized by the kadmin command.

gmt Greenwich Mean Time ut, utc Universal Time (Coordinated). wet Western European Time. (Same as GMT.) bst British Summer Time. (1 hour ahead of GMT.) wat West Africa Time. (1 hour behind GMT.) at Azores Time. (2 hours behind GMT.) bst Brazil Standard Time. (3 hours behind GMT.) Note that the abbreviation BST also

stands for British Summer Time.

gst Greenland Standard Time. (3 hours behind GMT.) Note that the abbreviation GST

also stands for Guam Standard Time.

nft Newfoundland Time. (3.5 hours behind GMT.) nst Newfoundland Standard Time. (3.5 hours behind GMT.) ndt Newfoundland Daylight Time. (2.5 hours behind GMT.) ast Atlantic Standard Time. (4 hours behind GMT.) adt Atlantic Daylight Time. (3 hours behind GMT.) est Eastern Standard Time. (5 hours behind GMT.) edt Eastern Daylight Time. (4 hours behind GMT.) cst Central Standard Time. (6 hours behind GMT.) cdt Central Daylight Time. (5 hours behind GMT.) mst Mountain Standard Time. (7 hours behind GMT.) mdt Mountain Daylight Time. (6 hours behind GMT.) pst Pacific Standard Time. (8 hours behind GMT.) pdt Pacific Daylight Time. (7 hours behind GMT.) yst Yukon Standard Time. (9 hours behind GMT.) ydt Yukon Daylight Time. (8 hours behind GMT.) hst Hawaii Standard Time. (10 hours behind GMT.) hdt Hawaii Daylight Time. (9 hours behind GMT.) cat Central Alaska Time. (10 hours behind GMT.) ahst Alaska-Hawaii Standard Time. (10 hours behind GMT.) nt Nome Time. (11 hours behind GMT.) idlw International Date Line West Time. (12 hours behind GMT.) cet Central European Time. (1 hour ahead of GMT.) met Middle European Time. (1 hour ahead of GMT.) mewt Middle European Winter Time. (1 hour ahead of GMT.) mest Middle European Summer Time. (2 hours ahead of GMT.) swt Swedish Winter Time. (1 hour ahead of GMT.) sst Swedish Summer Time. (1 hours ahead of GMT.) fwt French Winter Time. (1 hour ahead of GMT.) fst French Summer Time. (2 hours ahead of GMT.) eet Eastern Europe Time; Russia Zone 1. (2 hours ahead of GMT.) bt Baghdad Time; Russia Zone 2. (3 hours ahead of GMT.) it Iran Time. (3.5 hours ahead of GMT.) zp4 Russia Zone 3. (4 hours ahead of GMT.) zp5 Russia Zone 4. (5 hours ahead of GMT.) ist Indian Standard Time. (5.5 hours ahead of GMT.) zp6 Russia Zone 5. (6 hours ahead of GMT.) nst North Sumatra Time. (6.5 hours ahead of GMT.) Note that the abbreviation NST is

also used for Newfoundland Stanard Time.

sst South Sumatra Time; Russia Zone 6. (7 hours ahead of GMT.) Note that SST is also

Swedish Summer Time.

wast West Australian Standard Time. (7 hours ahead of GMT.) wadt West Australian Daylight Time. (8 hours ahead of GMT.) jt Java Time. (7.5 hours ahead of GMT.) cct China Coast Time; Russia Zone 7. (8 hours ahead of GMT.) jst Japan Standard time; Russia Zone 8. (9 hours ahead of GMT.) kst Korean Standard Time. (9 hours ahead of GMT.) cast Central Australian Standard Time. (9.5 hours ahead of GMT.) cadt Central Australian Daylight Time. (10.5 hours ahead of GMT.) east Eastern Australian Standard Time. (10 hours ahead of GMT.) eadt Eastern Australian Daylight Time. (11 hours ahead of GMT.) gst Guam Standard Time; Russia Zone 9. (10 hours ahead of GMT.) kdt Korean Daylight Time. (10 hours ahead of GMT.) nzt New Zealand Time. (12 hours ahead of GMT.) nzst New Zealand Standard Time. (12 hours ahead of GMT.) nzdt New Zealand Daylight Time. (13 hours ahead of GMT.) idle International Date Line East. (12 hours ahead of GMT.)

58 Kerberos V5 System Administrator’s Guide

Table of Contents

1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1

1.1 Why Should I use Kerberos? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 1.2 Documentation for Kerberos V5 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 1.3 Overview of This Guide. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1

2 How Kerberos Works . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3

2.1 Network Services and Their Client Programs . . . . . . . . . . . . . . . . . . . . . 3 2.2 Kerberos Tickets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 2.3 The Kerberos Database . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 2.4 Kerberos Realms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 2.5 The Ticket-Granting Ticket . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 2.6 Network Services and the Master Database . . . . . . . . . . . . . . . . . . . . . . . 4

2.6.1 The Keytab File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 2.7 The User–Kerberos Interaction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 2.8 Definitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6

3 Configuration Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7

3.1 krb5.conf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 3.1.1 [libdefaults] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 3.1.2 [appdefaults] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 3.1.3 [realms] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 3.1.4 [domain realm] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 3.1.5 [logging] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 3.1.6 [capaths] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 3.1.7 Sample krb5.conf File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13

3.2 kdc.conf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 3.2.1 [kdcdefaults] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 3.2.2 [realms] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 3.2.3 Sample kdc.conf File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16

4 Administrating the Kerberos Database. . . . . . . . . . . 17

4.1 Kadmin Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 4.2 Date Format . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 4.3 Principals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19

4.3.1 Retrieving Information About a Principal . . . . . . . . . . . . . . 19 4.3.1.1 Attributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 4.3.1.2 Retrieving a List of Principals . . . . . . . . . . . . . . . . 20 4.3.2 Privileges . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 4.3.3 Adding or Modifying Principals. . . . . . . . . . . . . . . . . . . . . . . . 21 4.3.4 Deleting Principals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 4.3.5 Changing Passwords . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 4.3.6 Renaming Principals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26

4.4 Policies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26 4.4.1 Retrieving Policies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26 4.4.2 Retrieving the List of Policies. . . . . . . . . . . . . . . . . . . . . . . . . . 27 4.4.3 Adding or Modifying Policies . . . . . . . . . . . . . . . . . . . . . . . . . . 27 4.4.4 Deleting Policies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28

4.5 Dumping a Kerberos Database to a File. . . . . . . . . . . . . . . . . . . . . . . . . 29 4.6 Restoring a Kerberos Database from a Dump File . . . . . . . . . . . . . . . 30 4.7 Creating a Stash File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 4.8 Creating and Destroying a Kerberos Database . . . . . . . . . . . . . . . . . . . 31

5 Application Servers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33

5.1 Keytabs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33 5.1.1 Adding Principals to Keytabs. . . . . . . . . . . . . . . . . . . . . . . . . . 33 5.1.2 Removing Principals from Keytabs. . . . . . . . . . . . . . . . . . . . . 34

5.2 Clock Skew . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 5.3 Getting DNS Information Correct . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35 5.4 Configuring Your Firewall to Work With Kerberos V5 . . . . . . . . . . . 36

6 Backups of Secure Hosts . . . . . . . . . . . . . . . . . . . . . . . . . . 39

6.1 Backing Up the Kerberos Database . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39

7 Bug Reporting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41

Appendix A Appendix . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45

A.1 Kerberos Error Messages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45 A.1.1 Kerberos V5 Library Error Codes . . . . . . . . . . . . . . . . . . . . . 45 A.1.2 Kerberos V5 Database Library Error Codes . . . . . . . . . . . . 52 A.1.3 Kerberos V5 Magic Numbers Error Codes. . . . . . . . . . . . . . 52 A.1.4 ASN.1 Error Codes. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54 A.1.5 GSSAPI Error Codes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55

A.2 kadmin Time Zones . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55