MIT Kerberos V5-1.6

Introduction to MIT Kerberos V5

MIT Kerberos V5 is a free implementation of Kerberos 5. Kerberos is a network authentication protocol. It centralizes the authentication database and uses kerberized applications to work with servers or services that support Kerberos allowing single logins and encrypted communication over internal networks or the Internet.

Package Information

MIT Kerberos V5 Dependencies


Linux-PAM- (for xdm based logins), OpenLDAP-2.3.39, and DejaGnu-1.4.4 (required to run the test suite)



Some sort of time synchronization facility on your system (like NTP-4.2.4p0) is required since Kerberos won't authenticate if there is a time difference between a kerberized client and the KDC server.

User Notes:

Installation of MIT Kerberos V5

MIT Kerberos V5 is distributed in a TAR file containing a compressed TAR package and a detached PGP ASC file. You'll need to unpack the distribution tar file, then unpack the compressed tar file before starting the build.

After unpacking the distribution tarball and if you have GnuPG-1.4.7 installed, you can authenticate the package with the following command:

gpg - -verify krb5-1.6.tar.gz.asc

Build MIT Kerberos V5 by running the following commands:

cd src &&
./configure CPPFLAGS="-I/usr/include/et -I/usr/include/ss" \
            --prefix=/usr \
            --sysconfdir=/etc/krb5 \
            --localstatedir=/var/lib \
            --with-system-et \
            --with-system-ss \
            --enable-dns-for-realm \
            --mandir=/usr/share/man &&

The regression test suite is designed to be run after the installation has been completed.

Now, as the root user:

make install &&

mv -v /usr/bin/ksu /bin &&
chmod -v 755 /bin/ksu &&
mv -v /usr/lib/* /lib &&
mv -v /usr/lib/* /lib &&
mv -v /usr/lib/* /lib &&

ln -v -sf ../../lib/ /usr/lib/ &&
ln -v -sf ../../lib/ /usr/lib/ &&
ln -v -sf ../../lib/ /usr/lib/

install -m644 -v ../doc/*.info* /usr/share/info &&
for INFOFILE in 425 5-admin 5-install 5-user; do
    install-info --info-dir=/usr/share/info \
    rm ../doc/krb$*
done &&

install -m755 -v -d /usr/share/doc/krb5-1.6 &&
cp -Rv ../doc/* /usr/share/doc/krb5-1.6


login.krb5 does not support Shadow passwords. As a result, when the Kerberos server is unavailable, the default fall through to /etc/passwd will not work because the passwords have been moved to /etc/shadow during the LFS build process. Entering the following commands without moving the passwords back to /etc/passwd could prevent any logins.

After considering (and understanding) the above warning, the following commands can be entered as the root user to replace the existing login program with the Kerberized version (after preserving the original) and move the support libraries to a location available when the /usr filesystem is not mounted:

mv -v /bin/login /bin/login.shadow &&
install -m755 -v /usr/sbin/login.krb5 /bin/login &&

mv -v /usr/lib/* /lib &&
mv -v /usr/lib/* /lib &&

ln -v -sf ../../lib/ /usr/lib/ &&
ln -v -sf ../../lib/ /usr/lib/ &&


To test the installation, you must have DejaGnu-1.4.4 installed and issue: make check. The RPC layer tests will require a portmap daemon (see portmap-6.0) running and configured to listen on the regular network interface (not localhost). See the “Testing the Build” section of the krb5-install.html file in the ../doc directory for complete information on running the regression tests.

Command Explanations

--enable-dns-for-realm: This parameter allows realms to be resolved using the DNS server.

--with-system-et: This parameter causes the build to use the system-installed versions of the error-table support software.

--with-system-ss: This parameter causes the build to use the system-installed versions of the subsystem command-line interface software.

--localstatedir=/var/lib: This parameter is used so that the Kerberos variable run-time data is located in /var/lib instead of /usr/var.

mv -v /usr/bin/ksu /bin: Moves the ksu program to the /bin directory so that it is available when the /usr filesystem is not mounted.

mv -v ... /lib && ln -v -sf ...: These libraries are moved to /lib so they are available when the /usr filesystem is not mounted.

Configuring MIT Kerberos V5

Config Files

/etc/krb5/krb5.conf and /var/lib/krb5kdc/kdc.conf

Configuration Information

Kerberos Configuration


You should consider installing some sort of password checking dictionary so that you can configure the installation to only accept strong passwords. A suitable dictionary to use is shown in the CrackLib-2.8.12 instructions. Note that only one file can be used, but you can concatenate many files into one. The configuration file shown below assumes you have installed a dictionary to /usr/share/dict/words.

Create the Kerberos configuration file with the following commands issued by the root user:

install -v -m755 -d /etc/krb5 &&
cat > /etc/krb5/krb5.conf << "EOF"
# Begin /etc/krb5/krb5.conf

    default_realm = <LFS.ORG>
    encrypt = true

    <LFS.ORG> = {
        kdc = <>
        admin_server = <>
        dict_file = /usr/share/dict/words

    .<> = <LFS.ORG>

    kdc = SYSLOG[:INFO[:AUTH]]
    admin_server = SYSLOG[INFO[:AUTH]]
    default = SYSLOG[[:SYS]]

# End /etc/krb5/krb5.conf

You will need to substitute your domain and proper hostname for the occurences of the <belgarath> and <> names.

default_realm should be the name of your domain changed to ALL CAPS. This isn't required, but both Heimdal and MIT recommend it.

encrypt = true provides encryption of all traffic between kerberized clients and servers. It's not necessary and can be left off. If you leave it off, you can encrypt all traffic from the client to the server using a switch on the client program instead.

The [realms] parameters tell the client programs where to look for the KDC authentication services.

The [domain_realm] section maps a domain to a realm.

Create the KDC database:

kdb5_util create -r <LFS.ORG> -s

Now you should populate the database with principles (users). For now, just use your regular login name or root.

kadmin: add_policy dict-only
kadmin: addprinc -policy dict-only <loginname>

The KDC server and any machine running kerberized server daemons must have a host key installed:

kadmin: addprinc -randkey host/<>

After choosing the defaults when prompted, you will have to export the data to a keytab file:

kadmin: ktadd host/<>

This should have created a file in /etc/krb5 named krb5.keytab (Kerberos 5). This file should have 600 (root rw only) permissions. Keeping the keytab files from public access is crucial to the overall security of the Kerberos installation.

Eventually, you'll want to add server daemon principles to the database and extract them to the keytab file. You do this in the same way you created the host principles. Below is an example:

kadmin: addprinc -randkey ftp/<>
kadmin: ktadd ftp/<>

Exit the kadmin program (use quit or exit) and return back to the shell prompt. Start the KDC daemon manually, just to test out the installation:

/usr/sbin/krb5kdc &

Attempt to get a ticket with the following command:

kinit <loginname>

You will be prompted for the password you created. After you get your ticket, you can list it with the following command:


Information about the ticket should be displayed on the screen.

To test the functionality of the keytab file, issue the following command:

ktutil: rkt /etc/krb5/krb5.keytab
ktutil: l

This should dump a list of the host principal, along with the encryption methods used to access the principal.

At this point, if everything has been successful so far, you can feel fairly confident in the installation and configuration of the package.

Install the /etc/rc.d/init.d/kerberos init script included in the blfs-bootscripts-20080816 package.

make install-kerberos
Using Kerberized Client Programs

To use the kerberized client programs (telnet, ftp, rsh, rcp, rlogin), you first must get an authentication ticket. Use the kinit program to get the ticket. After you've acquired the ticket, you can use the kerberized programs to connect to any kerberized server on the network. You will not be prompted for authentication until your ticket expires (default is one day), unless you specify a different user as a command line argument to the program.

The kerberized programs will connect to non kerberized daemons, warning you that authentication is not encrypted.

Using Kerberized Server Programs

Using kerberized server programs (telnetd, kpropd, klogind and kshd) requires two additional configuration steps. First the /etc/services file must be updated to include eklogin and krb5_prop. Second, the inetd.conf or xinetd.conf must be modified for each server that will be activated, usually replacing the server from Inetutils-1.5.

Additional Information

For additional information consult Documentation for krb-1.6 on which the above instructions are based.


Installed Programs: ftp, ftpd, gss-client, gss-server, k5srvutil, kadmin, kadmin.local, kadmind, kdb5_ldap_util, kdb5_util, kdestroy, kinit, klist, klogind, kpasswd, kprop, kpropd, krb5-config, krb5-send-pr, krb524d, krb524init, krb5kdc, kshd, ksu, ktutil, kvno, login.krb5, rcp, rlogin, rsh, sclient, sim_client, sim_server, sserver, telnet, telnetd, uuclient, uuserver and v4rcp
Installed Libraries:,,,,,,,,, and
Installed Directories: /etc/krb5, /usr/include/{gssapi,gssrpc,kerberosIV,krb5}, /usr/lib/krb5, /usr/share/{doc/krb5-1.6,examples,gnats} and /var/lib/krb5kdc

Short Descriptions


is a kerberized FTP client.


is a kerberized FTP daemon.


is a host keytable manipulation utility.


is an utility used to make modifications to the Kerberos database.


is a server for administrative access to a Kerberos database.


is the KDC database utility.


removes the current set of tickets.


is used to authenticate to the Kerberos server as a principal and acquire a ticket granting ticket that can later be used to obtain tickets for other services.


reads and displays the current tickets in the credential cache.


is the server that responds to rlogin requests.


is a program for changing Kerberos 5 passwords.


takes a principal database in a specified format and converts it into a stream of database records.


receives a database sent by kprop and writes it as a local database.


gives information on how to link programs against libraries.


is a Kerberos 5 server.


is the server that responds to rsh requests.


is the super user program using Kerberos protocol. Requires a properly configured /etc/shells and ~/.k5login containing principals authorized to become super users.


is a program for managing Kerberos keytabs.


prints keyversion numbers of Kerberos principals.


is a kerberized login program.


is a kerberized rcp client program.


is a kerberized rlogin client program.


is a kerberized rsh client program.


is a kerberized telnet client program.


is a kerberized telnet server.

contain the Generic Security Service Application Programming Interface (GSSAPI) functions which provides security services to callers in a generic fashion, supportable with a range of underlying mechanisms and technologies and hence allowing source-level portability of applications to different environments.

contains the administrative authentication and password checking functions required by Kerberos 5 client-side programs.

contain the administrative authentication and password checking functions required by Kerberos 5 servers.

is a Kerberos 5 authentication/authorization database access library.

is an all-purpose Kerberos 5 library.

Last updated on 2007-10-16 06:29:13 -0500