     [file definitions.texinfo not included]

This file documents how to install the RELEASE release of PRODUCT.

     [file copyright.texinfo not included]

Introduction
************

What is Kerberos and How Does it Work?
======================================

PRODUCT is based on the Kerberos authentication system developed at MIT.  Under Kerberos, a client (generally either a user or a service) sends a request for a ticket to the Key Distribution Center (KDC).  The KDC creates a ticket-granting ticket (TGT) for the client, encrypts it using the client's password as the key, and sends the encrypted TGT back to the client.  The client then attempts to decrypt the TGT, using its password.  If the client successfully decrypts the TGT (i.e., if the client gave the correct password), it keeps the decrypted TGT, which indicates proof of the client's identity.

The TGT, which expires at a specified time, permits the client to obtain additional tickets, which give permission for specific services.  The requesting and granting of these additional tickets is user-transparent.

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, PRODUCT from COMPANY will play a vital role in the security of your network.

     [file document-list.texinfo not included]

Please Read the Documentation
=============================

As with any software package that uses a centrallized database, the installation procedure is somewhat involved, and requires forethought and planning.  COMPANY has attempted to make this PRODUCT Installation Guide as concise as possible, rather than making it an exhaustive description of the details of Kerberos. Consequently, everything in this guide appears because COMPANY believes that it is important.  Please read and follow these instructions carefully, and if there is anything you do not understand or are not sure of, please don't hesitate to call us.

Overview of This Guide
======================

The next chapter describes the decisions you need to make before installing PRODUCT.

Chapter three describes installation procedures for each class of Kerberos machines:

 1. Key Distribution Centers (KDCs).

      A. The Master KDC.

      B. Slave KDCs.

 2. Client machines (user machines):

      A. UNIX client machines.

      B. Windows machines.

      C. Macintoshes.

 3. application server machines

Note that a machine can be both a client machine and an application server.

Chapter four describes our problem reporting system.

The appendices give sample configuration files.

Realm Configuration Decisions
*****************************

Before installing PRODUCT, it is necessary to consider the following issues:

  * The name of your Kerberos realm (or the name of each realm, if you need more than one).

  * How you will map your hostnames onto Kerberos realms.

  * Which ports your KDC and and kadmin (database access) services will use.

  * How many slave KDCs you need and where they should be located.

  * The hostnames of your master and slave KDCs.

  * How frequently you will propagate the database from the master KDC to the slave KDCs.

  * Whether you need backward compatibility with Kerberos V4.

Kerberos Realms
===============

Although your Kerberos realm can be any ASCII string, convention is to make it the same as your domain name, in upper-case letters.  For example, hosts in the domain SECONDDOMAIN would be in the Kerberos realm SECONDREALM.

If you need multiple Kerberos realms, COMPANY recommends that you use descriptive names which end with your domain name, such as BOSTON.SECONDREALM and SAN_FRANCISCO.SECONDREALM.

Mapping Hostnames onto Kerberos Realms
======================================

Mapping hostnames onto Kerberos realms is done through a set of rules in the krb5.conf configuration file.  (see krb5.conf.)  You can specify mappings for an entire domain or subdomain, and/or on a hostname-by-hostname basis.  Since greater specificity takes precedence, you would do this by specifying the mappings for a given domain or subdomain and listing the exceptions.

Ports for the KDC and Admin Services
====================================

The default ports used by Kerberos are port 88 for the KDC (Kerberos V4 used port 750.  If necessary, you can run on both ports for backward compatibility.)  and port 749 for the admin server.  You can, however, choose to run on other ports, as long as they are specified in each host's /etc/services and krb5.conf files, and the kdc.conf file on each KDC.  Because the kadmin port was recently assigned, COMPANY recommands that you specify it explicitly in your krb5.conf and kdc.conf files.  For a more thorough treatment of port numbers used by the PRODUCT programs, refer to the ``Configuring Your Firewall to Work With PRODUCT'' section of the PRODUCT System
Administrator's Guide.

Slave KDCs
==========

Slave KDCs provide an additional source of Kerberos ticket-granting services in the event of inaccessibility of the master KDC.  The number of slave KDCs you need and the decision of where to place them, both physically and logically, depend on the specifics of your network.

All of the Kerberos authentication on your network requires that each client be able to contact a KDC.  Therefore, you need to anticipate any likely reason a KDC might be unavailable and have a slave KDC to take up the slack.

Some considerations include:

  * Have at least one slave KDC as a backup, for when the master KDC is down, is being upgraded, or is otherwise unavailable.

  * If your network is split such that a network outage is likely to cause some segment or segments of the network to become cut off or isolated, have a slave KDC accessible to each segment.

  * If possible, have at least one slave KDC in a different building from the master, in case of power outages, fires, or other localized disasters.

If you have a large and/or complex network, COMPANY will be happy to work with you to determine the optimal number and placement of your slave KDCs.

Hostnames for the Master and Slave KDCs
=======================================

COMPANY recommends that your KDCs have a predefined set of cnames, such as KDCSERVER for the master KDC and KDCSLAVE1, KDCSLAVE2, ... for the slave KDCs.  This way, if you need to swap a machine, you only need to change a DNS entry, rather than having to change hostnames.

Database Propagation
====================

The Kerberos database resides on the master KDC, and must be propagated regularly (usually by a cron job) to the slave KDCs.  In deciding how frequently the propagation should happen, you will need to balance the amount of time the propagation takes against the maximum reasonable amount of time a user should have to wait for a password change to take effect.  COMPANY recommends that this be no longer than an hour.

If the propagation time is longer than this maximum reasonable time (e.g., you have a particularly large database, you have a lot of slaves, and/or you experience frequent network delays), you may wish to cut down on your propagation delay by performing the propagation in parallel.  To do this, have the master KDC propagate the database to one set of slaves, and then have each of these slaves propagate the database to additional slaves.

Building PRODUCT
****************

     [file build.texinfo not included]

Installing PRODUCT
******************

The sections of this chapter describe procedures for installing PRODUCT on:

 1. The KDCs

 2. Client machines

      A. UNIX client machines

      B. Windows machines

      C. Macintoshes

 3. UNIX Application Servers

Installing KDCs
===============

The Key Distribution Centers (KDCs) issue Kerberos tickets.  Each KDC contains a copy of the Kerberos database.  The master KDC contains the master copy of the database, which it propagates to the slave KDCs at regular intervals.  All database changes (such as password changes) are made on the master KDC.

Slave KDCs provide Kerberos ticket-granting services, but not database access.  This allows clients to continue to obtain tickets when the master KDC is unavailable.

COMPANY's recommends that you install all of your KDCs to be able to function as either the master or one of the slaves.  This will enable you to easily switch your master KDC with one of the slaves if necessary.  (see Switching Master and Slave KDCs.)  This installation procedure is based on that recommendation.

Install the Master KDC
----------------------

This installation procedure will require you to go back and forth a couple of times between the master KDC and each of the slave KDCs.  The first few steps must be done on the master KDC.

Edit the Configuration Files
............................

Modify the configuration files, /etc/krb5.conf (see krb5.conf) and ROOTDIR/lib/krb5kdc/kdc.conf (see kdc.conf) to reflect the correct information (such as the hostnames and realm name) for your realm.  COMPANY recommends that you keep krb5.conf in /etc.  The krb5.conf file may contain a pointer to kdc.conf, which you need to change if you want to move kdc.conf to another location.

Create the Database
...................

You will use the kdb5_util command on the Master KDC to create the Kerberos database and the optional stash file.  The stash file is a local copy of the master key that resides in encrypted form on the KDC's local disk.  The stash file is used to authenticate the KDC to itself automatically before starting the kadmind and krb5kdc daemons (e.g., as part of the machine's boot sequence).  The stash file, like the keytab file (see The Keytab File) is a potential point-of-entry for a break-in, and if compromised, would allow unrestricted access to the Kerberos database.  If you choose to install a stash file, it should be readable only by root, and should exist only on the KDC's local disk.  The file should not be part of any backup of the machine, unless access to the backup data is secured as tightly as access to the master password itself.

Note that kdb5_util will prompt you for the master key for the Kerberos database.  This key can be any string.  A good key is one you can remember, but that no one else can guess.  Examples of bad keys are words that can be found in a dictionary, any common or popular name, especially a famous person (or cartoon character), your username in any form (e.g., forward, backward, repeated twice, etc.), and any of the sample keys that appear in this manual.  One example of a key which would be good if it did not appear in this manual is ``MITiys4K5!'', which represents the sentence ``COMPANY is your source for Kerberos 5!''  (It's the first letter of each word, substituting the numeral ``4'' for the word ``for'', and includes the punctuation mark at the end.)

The following is an example of how to create a Kerberos database and stash file on the master KDC, using the kdb5_util command.  (The line that begins with => is a continuation of the previous line.) Replace PRIMARYREALM with the name of your Kerberos realm.

     shell% ROOTDIR/sbin/kdb5_util create -r PRIMARYREALM -s
     kdb5_util: No such file or directory while setting active database to '/krb5/principal'
     Initializing database 'ROOTDIR/lib/krb5kdc/principal' for
     => realm 'PRIMARYREALM',
     master key name 'K/M@PRIMARYREALM'
     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%

This will create five files in the directory specified in your kdc.conf file:  two Kerberos database files, principal.db, and principal.ok; the Kerberos administrative database file, principal.kadm5; the administrative database lock file, principal.kadm5.lock; and the stash file, .k5stash.  (The default directory is ROOTDIR/lib/krb5kdc.)  If you do not want a stash file, run the above command without the -s option.

Add Administrators to the Acl File
..................................

Next, you need create an Access Control List (acl) file, and put the Kerberos principal of at least one of the administrators into it.  The filename should match the value you have set for ``acl_file'' in your kdc.conf file.  The default file name is kadm5.acl.  The format of the file is:

     Kerberos principal      permissions     optional target principal

The Kerberos principal (and optional target principal) can include the ``*'' wildcard, so if you want any principal with the instance ``admin'' to have full permissions on the database, you could use the principal ``*/admin@REALM'' where ``REALM'' is your Kerberos realm.

Note:  a common use of an admin instance is so you can grant separate permissions (such as administrator access to the Kerberos database) to a separate Kerberos principal.  For example, the user ADMINUSER might have a principal for his administrative use, called ADMINUSER/admin.  This way, ADMINUSER would obtain ADMINUSER/admin tickets only when he actually needs to use those permissions.  Refer to the PRODUCT Administrator's Guide or the PRODUCT User's Guide for more detailed explanations of principals and instances.

The permissions (acls) recognized in the acl file are the following:

a
     allows the addition of principals or policies in the database.
A
     prohibits the addition of principals or policies in the database.
d
     allows the deletion of principals or policies in the database.
D
     prohibits the deletion of principals or policies in the database.
m
     allows the modification of principals or policies in the database.
M
     prohibits the modification of principals or policies in the database.
c
     allows the changing of passwords for principals in the database.
C
     prohibits the changing of passwords for principals in the database.
i
     allows inquiries to the database.
I
     prohibits inquiries to the database.
l
     allows the listing of principals or policies in the database.
L
     prohibits the listing of principals or policies in the database.
*
     Short for all privileges (admcil).
x
     Short for all privileges (admcil); identical to ``*''.

To give the principal */admin@PRIMARYREALM permission to change all of the database permissions on any principal permissions, you would place the following line in the file:

     */admin@PRIMARYREALM  *

To give the principal ADMINUSER@PRIMARYREALM permission to add, list, and inquire about any principal that has the instance ``root'', you would add the following line to the acl file:

     ADMINUSER@PRIMARYREALM  ali  */root@PRIMARYREALM

Add Administrators to the Kerberos Database
...........................................

Next you need to add administrative principals to the Kerberos database. (You must add at least one now.)  To do this, use kadmin.local on the master KDC, as in the following example:

     shell% ROOTDIR/sbin/kadmin.local
     kadmin: addprinc admin/admin@PRIMARYREALM
     WARNING: no policy specified for "admin/admin@PRIMARYREALM";
     defaulting to no policy.
     Enter password for principal admin/admin@PRIMARYREALM:  <= Enter a password.
     Re-enter password for principal admin/admin@PRIMARYREALM:  <= Type it again.
     Principal "admin/admin@PRIMARYREALM" created.
     kadmin:

Create a kadmind Keytab
.......................

The kadmind keytab is the key that kadmind will use to decrypt administrators' Kerberos tickets to determine whether or not it should give them access to the database.  You need to create the kadmin keytab with entries for the principals kadmin/admin and kadmin/changepw.  (These principals are placed in the Kerberos database automatically when you create it.)  To create the kadmin keytab, run kadmin and use the ktadd command, as in the following example.  (The line beginning with => is a continuation of the previous line.):

     shell% ROOTDIR/sbin/kadmin
     kadmin: ktadd -k ROOTDIR/lib/krb5kdc/kadm5.keytab
     => kadmin/admin kadmin/changepw
     kadmin: Entry for principal kadmin/admin@PRIMARYREALM with
          kvno 3, encryption type DES-CBC-CRC added to keytab
          WRFILE:ROOTDIR/lib/krb5kdc/kadm5.keytab.
     kadmin: quit
     shell%

As specified in the -k argument, ktadd will save the extracted keytab as ROOTDIR/lib/krb5kdc/kadm5.keytab. The filename you use must be the one specified in your kdc.conf file.

Start the Kerberos Daemons on the Master KDC
............................................

At this point, you are ready to start the Kerberos daemons on the Master KDC.  To do so, type:

     shell% ROOTDIR/sbin/krb5kdc
     shell% ROOTDIR/sbin/kadmind

Each daemon will fork and run in the background.  Assuming you want these daemons to start up automatically at boot time, you can add them to the KDC's /etc/rc or /etc/inittab file.  You need to have a stash file in order to do this.

Install the Slave KDCs
----------------------

You are now ready to start configuring the slave KDCs.  Assuming you are setting the KDCs up so that you can easily switch the master KDC with one of the slaves, you should perform each of these steps on the master KDC as well as the slave KDCs, unless these instructions specify otherwise.

Create Host Keys for the Slave KDCs
...................................

Each KDC needs a host principal in the Kerberos database.  You can enter these from any host, once the kadmind daemon is running.  For example, if your master KDC were called KDCSERVER.PRIMARYDOMAIN, and you had two KDC slaves named KDCSLAVE1.PRIMARYDOMAIN and KDCSLAVE2.PRIMARYDOMAIN, you would type the following:

     shell% ROOTDIR/sbin/kadmin
     kadmin: addprinc -randpass host/KDCSERVER.PRIMARYDOMAIN
     WARNING: no policy specified for "host/KDCSERVER.PRIMARYDOMAIN@PRIMARYREALM";
     defaulting to no policy.
     Principal "host/KDCSERVER.PRIMARYDOMAIN@PRIMARYREALM" created.
     kadmin: addprinc -randpass host/KDCSLAVE1.PRIMARYDOMAIN
     WARNING: no policy specified for "host/KDCSLAVE1.PRIMARYDOMAIN@PRIMARYREALM";
     defaulting to no policy.
     Principal "host/KDCSLAVE1.PRIMARYDOMAIN@PRIMARYREALM" created.
     kadmin: addprinc -randpass host/KDCSLAVE2.PRIMARYDOMAIN
     WARNING: no policy specified for "host/KDCSLAVE2.PRIMARYDOMAIN@PRIMARYREALM";
     defaulting to no policy.
     Principal "host/KDCSLAVE2.PRIMARYDOMAIN@PRIMARYREALM" created.
     kadmin:

It is not actually necessary to have the master KDC server in the Kerberos database, but it can be handy if:

  * anyone will be logging into the machine as something other than root

  * you want to be able to swap the master KDC with one of the slaves if necessary.

Extract Host Keytabs for the KDCs
.................................

Each KDC (including the master) needs a keytab to decrypt tickets. Ideally, you should extract each keytab locally on its own KDC.  If this is not feasible, you should use an encrypted session to send them across the network.  To extract a keytab on a KDC called KDCSERVER.PRIMARYDOMAIN, you would execute the following command:

     kadmin: ktadd host/KDCSERVER.PRIMARYDOMAIN
     kadmin: Entry for principal host/KDCSERVER.PRIMARYDOMAIN@PRIMARYREALM with
          kvno 1, encryption type DES-CBC-CRC added to keytab
          WRFILE:/etc/v5srvtab.
     kadmin:

Note that the principal must exist in the Kerberos database in order to extract the keytab.

Set Up the Slave KDCs for Database Propagation
..............................................

The database is propagated from the master KDC to the slave KDCs via the kpropd daemon.  To set up propagation, create a file on each KDC, named ROOTDIR/lib/krb5kdc/kpropd.acl, containing the principals for each of the KDCs. For example, if the master KDC were KDCSERVER.PRIMARYDOMAIN, the slave KDCs were KDCSLAVE1.PRIMARYDOMAIN and KDCSLAVE2.PRIMARYDOMAIN, and the realm were PRIMARYREALM, then the file's contents would be:

     host/KDCSERVER.PRIMARYDOMAIN@PRIMARYREALM
     host/KDCSLAVE1.PRIMARYDOMAIN@PRIMARYREALM
     host/KDCSLAVE2.PRIMARYDOMAIN@PRIMARYREALM

Then, add the following lines to /etc/inetd.conf file on each KDC (the line beginnng with => is a continuation of the previous line):

     krb5_prop stream tcp nowait root ROOTDIR/sbin/kpropd kpropd
     eklogin   stream tcp nowait root ROOTDIR/sbin/klogind
     => klogind -k -c -e

The first line sets up the kpropd database propagation daemon. The second line sets up the eklogin daemon, allowing Kerberos-authenticated, encrypted rlogin to the KDC.

You also need to add the following lines to /etc/services on each KDC:

     kerberos        88/udp      kdc       # Kerberos authentication (udp)
     kerberos        88/tcp      kdc       # Kerberos authentication (tcp)
     krb5_prop       754/tcp               # Kerberos slave propagation
     kerberos-adm    749/tcp              # Kerberos 5 admin/changepw (tcp)
     kerberos-adm    749/udp              # Kerberos 5 admin/changepw (udp)
     eklogin         2105/tcp              # Kerberos encrypted rlogin

Back on the Master KDC
----------------------

Now that the slave KDCs are able to accept database propagation, you'll need to propagate the database to each of them.

Propagate the Database to Each Slave KDC
........................................

First, create a dump of the database on the master KDC, as follows:

     shell% ROOTDIR/sbin/kdb5_util dump ROOTDIR/lib/krb5kdc/slave_datatrans
     shell%

Next, you need to manually propagate the database to each slave KDC, as in the following example.  (The lines beginning with => are continuations of the previous line.):

     ROOTDIR/sbin/kprop -f ROOTDIR/lib/krb5kdc/slave_datatrans
     => KDCSLAVE1.PRIMARYDOMAIN
     ROOTDIR/sbin/kprop -f ROOTDIR/lib/krb5kdc/slave_datatrans
     => KDCSLAVE2.PRIMARYDOMAIN

You will need a script to dump and propagate the database.  The following is an example of a bourne shell script that will do this. (Note that the line that begins with => is a continuation of the previous line.  Remember that you need to replace ROOTDIR with the name of the directory in which you installed PRODUCT.)

     #!/bin/sh

     kdclist = "KDCSLAVE1.PRIMARYDOMAIN KDCSLAVE2.PRIMARYDOMAIN"

     ROOTDIR/sbin/kdb5_util -R "dump
     => ROOTDIR/lib/krb5kdc/slave_datatrans"

     for kdc in $kdclist
     do
     ROOTDIR/sbin/kprop -f ROOTDIR/lib/krb5kdc/slave_datatrans $kdc
     done

You will need to set up a cron job to run this script at the intervals you decided on earlier (see Database Propagation.)

Finish Installing the Slave KDCs
--------------------------------

Now that the slave KDCs have copies of the Kerberos database, you can create stash files for them and start the krb5kdc daemon.

Create Stash Files on the Slave KDCs
....................................

Create stash files, by issuing the following commands on each slave KDC:

     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:  <= Enter the database master key.
     shell%

As mentioned above, the stash file is necessary for your KDCs to be able authenticate to themselves, such as when they reboot.  You could run your KDCs without stash files, but you would then need to type in the Kerberos database master key by hand every time you start a KDC daemon.

Start the krb5kdc Daemon on Each KDC
....................................

The final step in configuing your slave KDCs is to run the KDC daemon:

     shell% ROOTDIR/sbin/krb5kdc

As with the master KDC, you will probably want to add this command to the KDCs' /etc/rc or /etc/inittab files, so they will start the krb5kdc daemon automatically at boot time.

Add Kerberos Principals to the Database
---------------------------------------

Once your KDCs are set up and running, you are ready to use kadmin to load principals for your users, hosts, and other services into the Kerberos database.  This procedure is described fully in the ``Adding or Modifying Principals'' section of the PRODUCT System Administrator's Guide.  (see Create Host Keys for the Slave KDCs for a brief description.)  The keytab is generated by running kadmin and issuing the ktadd command.

Limit Access to the KDCs
------------------------

To limit the possibility that your Kerberos database could be compromised, COMPANY recommends that each KDC be a dedicated host, with limited access.  If your KDC is also a file server, FTP server, Web server, or even just a client machine, someone who obtained root access through a security hole in any of those areas could gain access to the Kerberos database.

COMPANY recommends that your KDCs use the following /etc/inetd.conf file.  (Note:  each line beginning with => is a continuation of the previous line.):

     #
     # Configuration file for inetd(1M).  See inetd.conf(4).
     #
     # To re-configure the running inetd process, edit this file, then
     # send the inetd process a SIGHUP.
     #
     # Syntax for socket-based Internet services:
     #  <service_name> <socket_type> <proto> <flags> <user>
     => <server_pathname> <args>
     #
     # Syntax for TLI-based Internet services:
     #
     #  <service_name> tli <proto> <flags> <user> <server_pathname> <args>
     #
     # Ftp and telnet are standard Internet services.
     #
     # This machine is a secure Kerberos Key Distribution Center (KDC).
     # Services are limited.
     #
     #
     # Time service is used for clock synchronization.
     #
     time    stream  tcp     nowait  root    internal
     time    dgram   udp     wait    root    internal
     #
     # Limited Kerberos services
     #
     krb5_prop stream tcp nowait root ROOTDIR/sbin/kpropd  kpropd
     eklogin   stream tcp nowait root ROOTDIR/sbin/klogind
     => klogind -k -c -e

Switching Master and Slave KDCs
-------------------------------

You may occasionally want to use one of your slave KDCs as the master. This might happen if you are upgrading the master KDC, or if your master KDC has a disk crash.

Assuming you have configured all of your KDCs to be able to function as either the master KDC or a slave KDC (as this document recommends), all you need to do to make the changeover is:

If the master KDC is still running, do the following on the old master KDC:

 1. Kill the kadmind process.

 2. Disable the cron job that propagates the database.

 3. Run your database propagation script manually, to ensure that the slaves all have the latest copy of the database.  (see Propagate the Database to Each Slave KDC.)

On the new master KDC:

 1. Create a database keytab.  (see Create a kadmind Keytab.)

 2. Start the kadmind daemon.  (see Start the Kerberos Daemons.)

 3. Set up the cron job to propagate the database.  (see Propagate the Database to Each Slave KDC.)

 4. Switch the cnames of the old and new master KDCs.  (If you don't do this, you'll need to change the krb5.conf file on every client machine in your Kerberos realm.)

Installing and Configuring UNIX Client Machines
===============================================

Client machine installation is much more straightforward than installation of the KDCs.

Client Programs
---------------

The Kerberized client programs are login.krb5, rlogin, telnet, ftp, rcp, rsh, kinit, klist, kdestroy, kpasswd, ksu, and krb524init.  All of these programs are in the directory ROOTDIR/bin, except for login.krb5 which is in ROOTDIR/sbin.

You will probably want to have your users put ROOTDIR/bin ahead of /bin and /usr/bin in their paths, so they will by default get the PRODUCT versions of rlogin, telnet, ftp, rcp, and rsh.

COMPANY recommends that you use login.krb5 in place of /bin/login to give your users a single-sign-on system.  You will need to make sure your users know to use their Kerberos passwords when they log in.

You will also need to educate your users to use the ticket management programs kinit, klist, kdestroy, and to use the Kerberos programs ksu, and kpasswd in place of their non-Kerberos counterparts su, passwd, and rdist.

Client Machine Configuration Files
----------------------------------

Each machine running Kerberos must have a /etc/krb5.conf file. (see krb5.conf)

Also, you must add the appropriate Kerberos services to each client machine's /etc/services file.  If you are using the default configuration for PRODUCT, you should be able to just insert the following code:

     #
     # Note --- if you are using Kerberos V4 and you either:
     #
     #    (a) haven't converted all your master or slave KDCs to V5, or
     #
     #    (b) are worried about inter-realm interoperability with other KDC's
     #        that are still using V4
     #
     # you will need to switch the "kerberos" service to port 750 and create a
     # "kerberos-sec" service on port 88.
     #
     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

As described in the comments in the above code, if your master KDC or any of your slave KDCs is running Kerberos V4, (or if you will be authenticating to any Kerberos V4 KDCs in another realm) you will need to switch the port number for kerberos to 750 and create a kerberos-sec service (tcp and udp) on port 88, so the Kerberos V4 KDC(s) will continue to work properly.

UNIX Application Servers
========================

An application server is a host that provides one or more services over the network.  Application servers can be ``secure'' or ``insecure.''  A ``secure'' host is set up to require authentication from every client connecting to it.  An ``insecure'' host will still provide Kerberos authentication, but will also allow unauthenticated clients to connect.

If you have PRODUCT installed on all of your client machines, COMPANY recommends that you make your hosts secure, to take advantage of the security that Kerberos authentication affords. However, if you have some clients that do not have PRODUCT installed, you can run an insecure server, and still take advantage of PRODUCT's single sign-on on capability.

Server Programs
---------------

Just as PRODUCT provided its own Kerberos-enhanced versions of client UNIX network programs, PRODUCT also provides Kerberos-enhanced versions of server UNIX network daemons.  These are ftpd, klogind, kshd, and telnetd. These programs are installed in the directory ROOTDIR/sbin.  You may want to add this directory to root's path.

Server Configuration Files
--------------------------

For a secure server, make the following changes to /etc/inetd.conf:

Find and comment out any lines for the services ftp, telnet, shell, login, and exec.

Add the following lines.  (Note:  each line beginning with => is a continuation of the previous line.)

     klogin  stream  tcp  nowait  root  ROOTDIR/sbin/klogind
     => klogind -k -c
     eklogin stream  tcp  nowait  root  ROOTDIR/sbin/klogind
     => klogind -k -c -e
     kshell  stream  tcp  nowait  root  ROOTDIR/sbin/kshd
     => kshd -k -c -A
     ftp     stream  tcp  nowait  root  ROOTDIR/sbin/ftpd
     => ftpd -a
     telnet  stream  tcp  nowait  root  ROOTDIR/sbin/telnetd
     => telnetd -a valid

For an insecure server, make the following changes instead to /etc/inetd.conf:

Find and comment out any lines for the services ftp and telnet.

Add the following lines.  (Note:  each line beginning with => is a continuation of the previous line.)

     klogin  stream  tcp  nowait  root  ROOTDIR/sbin/klogind
     => klogind -k -c
     eklogin stream  tcp  nowait  root  ROOTDIR/sbin/klogind
     => klogind -k -c -e
     kshell  stream  tcp  nowait  root  ROOTDIR/sbin/kshd
     => kshd -k -c -A
     ftp     stream  tcp  nowait  root  ROOTDIR/sbin/ftpd
     => ftpd
     telnet  stream  tcp  nowait  root  ROOTDIR/sbin/telnetd
     => telnetd -a none

The Keytab File
---------------

All Kerberos server machines need a keytab file, called /etc/v5srvtab, (The keytab was called a srvtab in Kerberos V4.  The v5srvtab file has not been renamed to reflect the change in terminology.) to authenticate to the KDC.  The keytab file is an encrypted, local, on-disk copy of the host's key.  The keytab file, like the stash file (Create the Database) is a potential point-of-entry for a break-in, and if compromised, would allow unrestricted access to its host.  The keytab file should be readable only by root, and should exist only on the machine's local disk.  The file should not be part of any backup of the machine, unless access to the backup data is secured as tightly as access to the machine's root password itself.

In order to generate a keytab for a host, the host must have a principal in the Kerberos database.  The procedure for adding hosts to the database is described fully in the ``Adding or Modifying Principals'' section of the PRODUCT System Administrator's Guide. See Create Host Keys for the Slave KDCs for a brief description.) The keytab is generated by running kadmin and issuing the ktadd command.

For example, to generate a keytab file to allow the host trillium.PRIMARYDOMAIN to authenticate for the services host, ftp, and pop, the administrator ADMINUSER would issue the command (on trillium.PRIMARYDOMAIN):

     trillium% ROOTDIR/sbin/kadmin
     kadmin5: ktadd host/trillium.PRIMARYDOMAIN ftp/trillium.PRIMARYDOMAIN
     => pop/trillium.PRIMARYDOMAIN
     kadmin: Entry for principal host/trillium.PRIMARYDOMAIN@PRIMARYREALM with
     kvno 3, encryption type DES-CBC-CRC added to keytab
     WRFILE:/etc/v5srvtab.
     kadmin: Entry for principal ftp/trillium.PRIMARYDOMAIN@PRIMARYREALM with
     kvno 3, encryption type DES-CBC-CRC added to keytab
     WRFILE:/etc/v5srvtab.
     kadmin: Entry for principal pop/trillium.PRIMARYDOMAIN@PRIMARYREALM with
     kvno 3, encryption type DES-CBC-CRC added to keytab
     WRFILE:/etc/v5srvtab.
     kadmin5: quit
     trillium%

If you generate the keytab file on another host, you need to get a copy of the keytab file onto the destination host (trillium, in the above example) without sending it unencrypted over the network.  If you have installed the PRODUCT client programs, you can use encrypted rcp.

Some Advice about Secure Hosts
------------------------------

PRODUCT can protect your host from certain types of break-ins, but it is possible to install PRODUCT and still leave your host vulnerable to attack.  Obviously an installation guide is not the place to try to include an exhaustive list of countermeasures for every possible attack, but it is worth noting some of the larger holes and how to close them.

As stated earlier in this section, COMPANY recommends that on a secure host, you disable the standard ftp, login, telnet, shell, and exec services in /etc/services.  We also recommend that secure hosts have an empty /etc/hosts.equiv file and that there not be a .rhosts file in root's home directory.  You can grant Kerberos-authenticated root access to specific Kerberos principals by placing those principals in the file .k5login in root's home directory.

We recommend that backups of secure machines exclude the keytab file (/etc/v5srvtab).  If this is not possible, the backups should at least be done locally, rather than over a network, and the backup tapes should be physically secured.

Finally, the keytab file and any programs run by root, including the PRODUCT binaries, should be kept on local disk.  The keytab file should be readable only by root.

Bug Reports for PRODUCT
***********************

     [file bug-report.texinfo not included]

Files
*****

krb5.conf
=========

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

     [libdefaults]
         ticket_lifetime = 600
         default_realm = PRIMARYREALM
         default_tkt_enctypes = des-cbc-crc
         default_tgs_enctypes = des-cbc-crc

     [realms]
         PRIMARYREALM = {
             kdc = KDCSERVER.PRIMARYDOMAIN:88
             kdc = KDCSLAVE1.PRIMARYDOMAIN:88
             kdc = KDCSLAVE2.PRIMARYDOMAIN:88
             admin_server = KDCSERVER.PRIMARYDOMAIN:749
             default_domain = PRIMARYDOMAIN
             }
         }

     [domain_realm]
         .PRIMARYDOMAIN = PRIMARYREALM
         PRIMARYDOMAIN = PRIMARYREALM

For the KDCs, add a section onto the end of the krb5.conf file telling where the kdc.conf file is located, as in the following example:

     [kdc]
         profile = ROOTDIR/lib/krb5kdc/kdc.conf

     [logging]
         kdc = FILE:/dev/ttyp9
         admin_server = FILE:/dev/ttyp9
         default = FILE:/dev/ttyp9

kdc.conf
========

Here's an example of a generic kdc.conf file:

     [kdcdefaults]
         kdc_ports = 88,750

     [realms]
         PRIMARYREALM = {
             profile = /etc/krb5.conf
             database_name = ROOTDIR/lib/krb5kdc/principal
             admin_database_name = ROOTDIR/lib/krb5kdc/principal.kadm5
             admin_database_lockfile = ROOTDIR/lib/krb5kdc/principal.kadm5.lock
             admin_keytab = ROOTDIR/lib/krb5kdc/kadm5.keytab
             acl_file = ROOTDIR/lib/krb5kdc/kadm5.acl
             dict_file = ROOTDIR/lib/krb5kdc/kadm5.dict
             key_stash_file = ROOTDIR/lib/krb5kdc/.k5.PRIMARYREALM
             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
         }

To add Kerberos V4 support, change the supported_enctypes line to:

             supported_enctypes = des-cbc-crc:normal des-cbc-crc:v4

Encryption Types and Salt Types
-------------------------------

Currently, PRODUCT supports only DES encryption.  The encoding type is des-cbc-crc.  The salt is additional information encoded within the key that tells what kind of key it is.  The only salts that you will be likely to encounter are:

  * normal, which COMPANY recommends using for all of your PRODUCT keys

  * v4, which is necessary only for compatibility with a v4 KDC

  * afs, which you will never need to generate, and which you will encounter only if you dump an AFS database into a Kerberos database

Support for additional encryption types is planned in the future.