Heimdal is a free implementation of Kerberos 5, that aims to be compatible with MIT krb5 and is backwards compatible with krb4. Kerberos is a network authentication protocol. Basically it preserves the integrity of passwords in any untrusted network (like the Internet). Kerberized applications work hand-in-hand with sites that support Kerberos to ensure that passwords cannot be stolen. A Kerberos installation will make changes to the authentication mechanisms on your network and will overwrite several programs and daemons from the Coreutils, Inetutils, Qpopper and Shadow packages.
Download (HTTP): http://ftp.vc-graz.ac.at/mirror/crypto/kerberos/heimdal/heimdal-0.6.3.tar.gz
Download (FTP): ftp://ftp.pdc.kth.se/pub/heimdal/src/heimdal-0.6.3.tar.gz
Download MD5 sum: 2265fd2d4573dd3a8da45ce62519e48b
Download size: 3.3 MB
Estimated disk space required: 70 MB
Estimated build time: 2.18 SBU
Required Patch: http://www.linuxfromscratch.org/blfs/downloads/6.0/heimdal-0.6.3-fhs_compliance-1.patch
Required patch for cracklib: http://www.linuxfromscratch.org/blfs/downloads/6.0/heimdal-0.6.3-cracklib-1.patch
Linux-PAM-0.78, OpenLDAP-2.2.20, X (X.org-6.8.2 or XFree86-4.4.0), cracklib-2.7 and krb4
Some sort of time synchronization facility on your system (like NTP-4.2.0) is required since Kerberos won't authenticate if the time differential between a kerberized client and the KDC server is more than 5 minutes.
Before installing the package, you may want to preserve the ftp program from the Inetutils package. This is because using the Heimdal ftp program to connect to non-kerberized ftp servers may not work properly. It will allow you to connect (letting you know that transmission of the password is clear text) but will have problems doing puts and gets. Issue the following command as the root user.
mv /usr/bin/ftp /usr/bin/ftpn
If you wish the Heimdal package to link against the cracklib library, you must apply a patch:
patch -Np1 -i ../heimdal-0.6.3-cracklib-1.patch
Install Heimdal by running the following commands:
patch -Np1 -i ../heimdal-0.6.3-fhs_compliance-1.patch &&
./configure --prefix=/usr --sysconfdir=/etc/heimdal \
--datadir=/var/lib/heimdal --localstatedir=/var/lib/heimdal \
--libexecdir=/usr/sbin --enable-shared \
--with-openssl=/usr --with-readline=/usr &&
make
Now, as the root user:
make install &&
mv /bin/login /bin/login.shadow &&
mv /bin/su /bin/su.shadow &&
mv /usr/bin/{login,su} /bin &&
ln -sf ../../bin/login /usr/bin &&
mv /usr/lib/lib{otp.so.0*,kafs.so.0*,krb5.so.17*,asn1.so.6*} \
/usr/lib/lib{roken.so.16*,crypto.so.0*,db-4.3.so} /lib &&
ln -sf ../../lib/lib{otp.so.0{,.1.4},kafs.so.0{,.4.0},db-4.3.so} \
/usr/lib &&
ln -sf ../../lib/lib{krb5.so.17{,.3.0},asn1.so.6{,.0.2}} \
/usr/lib &&
ln -sf ../../lib/lib{roken.so.16{,.0.3},crypto.so.0{,.9.7}} \
/usr/lib &&
ldconfig
--libexecdir=/usr/sbin: This switch puts the daemon programs into /usr/sbin.
If you want to preserve all your existing Inetutils package daemons, install the Heimdal daemons into /usr/sbin/heimdal (or wherever you want). Since these programs will be called from (x)inetd or rc scripts, it really doesn't matter where they are installed, as long as they are correctly specified in the /etc/(x)inetd.conf file and rc scripts. If you choose something other than /usr/sbin, you may want to move some of the user programs (such as kadmin) to /usr/sbin manually so they'll be in the privileged user's default path.
mv ... .shadow; mv ... /bin; ln -sf ../../bin...: The login and su programs installed by Heimdal belong in the /bin directory. The login program is symlinked because Heimdal is expecting to find it in /usr/bin. The old executables are preserved before the move to keep things sane should breaks occur.
mv ... /lib; ln -sf ../../lib/lib... /usr/lib: The login and su programs installed by Heimdal link against Heimdal libraries as well as libraries provided by the OpenSSL and Berkeley DB packages. These libraries are moved to /lib to be FHS compliant and also in case /usr is located on a separate partition which may not always be mounted.
Create the Kerberos configuration file with the following commands:
install -d /etc/heimdal && cat > /etc/heimdal/krb5.conf << "EOF" # Begin /etc/heimdal/krb5.conf [libdefaults] default_realm = [EXAMPLE.COM] encrypt = true [realms] [EXAMPLE.COM] = { kdc = [hostname.example.com] admin_server = [hostname.example.com] kpasswd_server = [hostname.example.com] } [domain_realm] .[example.com] = [EXAMPLE.COM] [logging] kdc = FILE:/var/log/kdc.log admin_server = FILE:/var/log/kadmin.log default = FILE:/var/log/krb.log # End /etc/heimdal/krb5.conf EOF
You will need to substitute your domain and proper hostname for the occurrences of the [hostname] and [EXAMPLE.COM] names.
default_realm should be the name of your domain changed to ALL CAPS. This isn't required, but both Heimdal and MIT krb5 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.
Store the master password in a key file using the following commands:
install -d -m 755 /var/lib/heimdal &&
kstash
Create the KDC database:
kadmin -l
Choose the defaults for now. You can go in later and change the defaults, should you feel the need. At the kadmin> prompt, issue the following statement:
init [EXAMPLE.COM]
The database must now be populated with at least one principle (user). For now, just use your regular login name or root. You may create as few, or as many principles as you wish using the following statement:
add [loginname]
The KDC server and any machine running kerberized server daemons must have a host key installed:
add --random-key host/[hostname.example.com]
After choosing the defaults when prompted, you will have to export the data to a keytab file:
ext host/[hostname.example.com]
This should have created two files in /etc/heimdal: krb5.keytab (Kerberos 5) and srvtab (Kerberos 4). Both files 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:
add --random-key ftp/[hostname.example.com]
(choose the defaults)
ext ftp/[hostname.example.com]
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/kdc &
Attempt to get a TGT (ticket granting ticket) with the following command:
kinit [loginname]
You will be prompted for the password you created. After you get your ticket, you should list it with the following command:
klist
Information about the ticket should be displayed on the screen.
To test the functionality of the keytab file, issue the following command:
ktutil list
This should dump a list of the host principals, along with the encryption methods used to access the principals.
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/heimdal init script included in the blfs-bootscripts-6.0 package:
make install-heimdal
To use the kerberized client programs (telnet, ftp, rsh, rxterm, rxtelnet, rcp, xnlock), you first must get a TGT. 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. As mentioned earlier, only the ftp program gives any trouble connecting to non-kerberized daemons.
In order to use the Heimdal X programs, you'll need to add a service port entry to the /etc/services file for the kxd server. There is no 'standardized port number' for the 'kx' service in the IANA database, so you'll have to pick an unused port number. Add an entry to the services file similar to the entry below (substitute your chosen port number for [49150]):
kx [49150]/tcp # Heimdal kerberos X kx [49150]/udp # Heimdal kerberos X
For additional information consult the Heimdal hint on which the above instructions are based.
obtains AFS tokens for a number of cells.
is a kerberized FTP client.
is a kerberized FTP daemon.
takes a principal database in a specified format and converts it into a stream of Heimdal database records.
is a server that receives a database sent by hprop and writes it as a local database.
is a daemon which runs on the master KDC server which incrementally propogates changes to the KDC database to the slave KDC servers.
is a daemon which runs on the slave KDC servers which incrementally propogates changes to the KDC database from the master KDC server.
is a utility used to make modifications to the Kerberos database.
is a server for administrative access to the Kerberos database.
is a symbolic link to the kinit program.
is a Kerberos 5 server.
removes a principle's current set of tickets.
is a program which forwards tickets to a remote host through an authenticated and encrypted stream.
is a server used to receive forwarded tickets.
obtains a ticket for a service.
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 a program for changing Kerberos 5 passwords.
is a Kerberos 5 password changing server.
gives information on how to link programs against Heimdal libraries.
stores the KDC master password in a file.
is a program for managing Kerberos keytabs.
is a program which securely forwards X connections.
is the daemon for kx.
is a kerberized login program.
manages one-time passwords.
prints lists of one-time passwords.
is a script that runs push --from.
is a kerberized POP-3 server.
is a kerberized POP mail retreival client.
is a kerberized rcp client program.
is a kerberized rsh client program.
is a kerberized rsh server.
starts a secure xterm window with a telnet to a given host and forwards X connections.
starts a secure remote xterm.
maps a password into a key.
is a kerberized su client program.
is a kerberized telnet client program.
is a kerberized telnet server.
forwards X connections backwards.
checks krb5.conf file for obvious errors.
is a program that acts as a secure screen saver for workstations running X.
provides the ASN.1 and DER functions to encode and decode the Kerberos TGTs.
is a command-line editing library with history.
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.
is a Heimdal Kerberos 5 authentication/authorization database access library.
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.
contains the functions required to authenticated to AFS.
is an all-purpose Kerberos 5 library.
contains the functions required to handle authenticating one time passwords.
is a library containing Kerberos 5 compatibility functions.
Last updated on 2005-02-04 11:58:22 -0700