Difference between revisions of "Heimdal"

From CBLFS
Jump to navigationJump to search
 
 
(24 intermediate revisions by 7 users not shown)
Line 1: Line 1:
No help yet...
+
{| style="text-align: left; background-color: AliceBlue;"
 +
|-valign="top"
 +
!Download Source:
 +
| http://ftp.vc-graz.ac.at/mirror/crypto/kerberos/heimdal/heimdal-{{Heimdal-Version}}.tar.gz
 +
|-valign="top"
 +
!Download Patch:
 +
| ftp://ftp.pdc.kth.se/pub/heimdal/src/heimdal-{{Heimdal-Version}}-setuid-patch.txt
 +
|-valign="top"
 +
!Download Patch:
 +
|  http://svn.cross-lfs.org/svn/repos/patches/heimdal/heimdal-{{Heimdal-Version}}-fhs_compliance-1.patch
 +
|-valign="top"
 +
!Download Patch (for cracklib):
 +
|  http://svn.cross-lfs.org/svn/repos/patches/heimdal/heimdal-{{Heimdal-Version}}-cracklib-1.patch
 +
|}
 +
 
 +
----
 +
 
 +
{{Package-Introduction|Heimdal is an implementation of Kerberos 5|http://www.h5l.org/}}
 +
 
 +
{{Note|Using Heimdal instead of Kerberos will break some packages expecting kerberos.}}
 +
 
 +
== Dependencies ==
 +
 
 +
=== Required ===
 +
* [[Berkeley DB]] or [[GDBM]]
 +
 
 +
=== Reccomended ===
 +
* [[OpenSSL]]
 +
=== Optional ===
 +
* [[Linux-PAM]]
 +
* [[OpenLDAP]]
 +
* [[X Window System]]
 +
* [[Cracklib]]
 +
* [[krb4]]
 +
 
 +
{{Note|Some sort of time synchronization facility on your system (like [[NTP]]) is required since Kerberos won't authenticate if the time differential between a kerberized client and the KDC server is more than 5 minutes.}}
 +
 
 +
== Non-Multilib ==
 +
 
 +
<font color=red>'''Warning:'''</font>
 +
Ensure you really need a Kerberos installation before you decide to
 +
install this package. Failure to install and configure the package in
 +
accordance with the instructions below can alter your system so that
 +
users cannot log in.
 +
 
 +
If you wish the Heimdal package to link against the CrackLib library to provide enforcement of strong passwords (requires CrackLib-2.8.9 installed with the heimdal patch), you must apply a patch:
 +
 
 +
patch -Np1 -i ../heimdal-{{Heimdal-Version}}-cracklib-1.patch
 +
 
 +
Install Heimdal by running the following commands:
 +
 
 +
patch -Np1 -i ../heimdal-{{Heimdal-Version}}-setuid-patch.txt &&
 +
patch -Np1 -i ../heimdal-{{Heimdal-Version}}-fhs_compliance-1.patch &&
 +
./configure --prefix=/usr \
 +
            --sysconfdir=/etc/heimdal \
 +
            --libexecdir=/usr/sbin \
 +
            --datadir=/var/lib/heimdal \
 +
            --localstatedir=/var/lib/heimdal \
 +
            --enable-shared \
 +
            --with-readline=/usr &&
 +
make
 +
 
 +
Now, as the root user (the following process requires [[Berkeley DB]] 4.5.*. Adjust the script if you didn't have Berkeley DB or using a different version):
 +
 
 +
mv -v /usr/include/fnmatch.h /usr/include/fnmatch.h.glibc &&
 +
mv -v /usr/include/glob.h /usr/include/glob.h.glibc &&
 +
mv -v /usr/include/ss/ss.h /usr/include/ss/ss.h.e2fsprogs &&
 +
mv -v /usr/lib/libss.a /usr/lib/libss.a.e2fsprogs &&
 +
mv -v /usr/lib/libss.so /usr/lib/libss.so.e2fsprogs &&
 +
make install &&
 +
mv -v /usr/include/fnmatch.h /usr/include/fnmatch.h.heimdal &&
 +
mv -v /usr/include/fnmatch.h.glibc /usr/include/fnmatch.h &&
 +
mv -v /usr/include/glob.h /usr/include/glob.h.heimdal &&
 +
mv -v /usr/include/glob.h.glibc /usr/include/glob.h &&
 +
install -v -m755 -d /usr/share/doc/heimdal-0.7.2/standardisation &&
 +
install -v -m644 doc/{init-creds,layman.asc} \
 +
    /usr/share/doc/heimdal-{{Heimdal-Version}} &&
 +
install -v -m644 doc/standardisation/* \
 +
    /usr/share/doc/heimdal-{{Heimdal-Version}}/standardisation &&
 +
mv -v /bin/login /bin/login.shadow &&
 +
mv -v /bin/su /bin/su.shadow &&
 +
mv -v /usr/bin/{login,su} /bin &&
 +
ln -v -sf ../../bin/login /usr/bin &&
 +
mv -v /usr/lib/lib{otp,kafs,krb5,asn1,roken,crypto}.so.* \
 +
      /usr/lib/libdb-4.5.so /lib &&
 +
ln -v -sf ../../lib/libdb-4.5.so /usr/lib/libdb.so &&
 +
ln -v -sf ../../lib/libdb-4.5.so /usr/lib/libdb-4.so &&
 +
for SYMLINK in otp.so.0.1.3  kafs.so.0.4.1  krb5.so.17.4.0 \
 +
                asn1.so.6.1.0 roken.so.16.1.0 crypto.so.0.9.8
 +
do
 +
    ln -v -sf ../../lib/lib$SYMLINK \
 +
        /usr/lib/lib`echo $SYMLINK | cut -d. -f1`.so
 +
done
 +
/sbin/ldconfig
 +
 
 +
=== Command Explanations ===
 +
 
 +
'''mv -v /usr/include/...''' and '''mv -v /usr/lib/libss.*''': The Heimdal installation will overwrite two interface headers from the Glibc package and an interface header, static library and library symbolic link from the E2fsprogs package. These commands move the original files out of the way before the installation, and then restore the original Glibc headers after the installation. The two Heimdal headers are renamed and preserved on the system. Testing has shown that the system is stable using the Heimdal version of the libss library and interface header.  Also make sure you're using the Glibc glob.h.  Most packages will fail because of undefined symbols rk_glob from the Heimdal headers.
 +
 
 +
--libexecdir=/usr/sbin: This switch puts the daemon programs into /usr/sbin.
 +
 
 +
'''Tip:'''
 +
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 -v -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 so that they can be restored if you experience problems logging into the system after the Heimdal package is installed and configured.
 +
 
 +
'''mv ... /lib'''; '''ln -v -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.
 +
 
 +
== Multilib ==
 +
 
 +
TODO...
 +
 
 +
=== 32Bit ===
 +
 
 +
TODO...
 +
 
 +
=== N32 ===
 +
 
 +
TODO...
 +
 
 +
=== 64Bit ===
 +
 
 +
TODO...
 +
 
 +
== Configuration ==
 +
 
 +
Create the Kerberos configuration file with the following commands:
 +
 
 +
install -v -m755 -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
 +
chmod -v 644 /etc/heimdal/krb5.conf
 +
 
 +
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 -v -m755 -d /var/lib/heimdal &&
 +
kstash
 +
 
 +
Create the KDC database:
 +
 
 +
kadmin -l
 +
 
 +
The commands below will prompt you for information about the principles. Choose the defaults for now unless you know what you are doing and need to specify different values. You can go in later and change the defaults, should you feel the need. You may use the up and down arrow keys to use the history feature of kadmin in a similar manner as the bash history feature.
 +
 
 +
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, setup and configuration of your new Heimdal Kerberos 5 installation.
 +
 
 +
Install the /etc/rc.d/init.d/heimdal init script included in the [[bootscripts]] package:
 +
 
 +
make install-heimdal
 +
 
 +
= Contents =
 +
 
 +
{| style="text-align: left;"
 +
|-valign="top"
 +
! Installed Programs:
 +
| afslog, dump_log, ftp, ftpd, hprop, hpropd, ipropd-master, ipropd-slave, kadmin, kadmind, kauth, kcm, kdc, kdestroy, kf, kfd, kgetcred, kinit, klist, kpasswd, kpasswdd, krb5-config, kstash, ktutil, kx, kxd, login, mk_cmds, otp, otpprint, pagsh, pfrom, popper, push, rcp, replay_log, rsh, rshd, rxtelnet, rxterm, string2key, su, telnet, telnetd, tenletxr, truncate-log, verify_krb5_conf and xnlock
 +
|-valign="top"
 +
! Installed Libraries:
 +
| libasn1.{so,a}, libeditline.{so,a}, libgssapi.{so,a}, libhdb.{so,a}, libkadm5clnt.{so,a}, libkadm5srv.{so,a}, libkafs.{so,a}, libkrb5.{so,a}, libotp.{so,a}, libroken.{so,a}, libsl.{so,a} and libss.{so,a}
 +
|-valign="top"
 +
! Installed Directories:
 +
| /etc/heimdal, /usr/include/kadm5, /usr/share/doc/heimdal-0.7.2 and /var/lib/heimdal
 +
|}
 +
 
 +
=== Short Descriptions ===
 +
 
 +
{| style="text-align: left;"
 +
|-valign="top"
 +
! afslog
 +
| obtains AFS tokens for a number of cells.
 +
|-valign="top"
 +
! ftp
 +
| is a kerberized FTP client.
 +
|-valign="top"
 +
! ftpd
 +
| is a kerberized FTP daemon.
 +
|-valign="top"
 +
! hprop
 +
| takes a principal database in a specified format and converts it into a stream of Heimdal database records.
 +
|-valign="top"
 +
! hpropd
 +
| is a server that receives a database sent by hprop and writes it as a local database.
 +
|-valign="top"
 +
! ipropd-master
 +
| is a daemon which runs on the master KDC server which incrementally propagates changes to the KDC database to the slave KDC servers.
 +
|-valign="top"
 +
! ipropd-slave
 +
| is a daemon which runs on the slave KDC servers which incrementally propagates changes to the KDC database from the master KDC server.
 +
|-valign="top"
 +
! kadmin
 +
| is a utility used to make modifications to the Kerberos database.
 +
|-valign="top"
 +
! kadmind
 +
| is a server for administrative access to the Kerberos database.
 +
|-valign="top"
 +
! kauth
 +
| is a symbolic link to the kinit program.
 +
|-valign="top"
 +
! kcm
 +
| is a process based credential cache for Kerberos tickets.
 +
|-valign="top"
 +
! kdc
 +
| is a Kerberos 5 server.
 +
|-valign="top"
 +
! kdestroy
 +
| removes a principle's current set of tickets.
 +
|-valign="top"
 +
! kf
 +
| is a program which forwards tickets to a remote host through an authenticated and encrypted stream.
 +
|-valign="top"
 +
! kfd
 +
| is a server used to receive forwarded tickets.
 +
|-valign="top"
 +
! kgetcred
 +
| obtains a ticket for a service.
 +
|-valign="top"
 +
! kinit
 +
| 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.
 +
|-valign="top"
 +
! klist
 +
| reads and displays the current tickets in the credential cache.
 +
|-valign="top"
 +
! kpasswd
 +
| is a program for changing Kerberos 5 passwords.
 +
|-valign="top"
 +
! kpasswdd
 +
| is a Kerberos 5 password changing server.
 +
|-valign="top"
 +
! krb5-config
 +
| gives information on how to link programs against Heimdal libraries.
 +
|-valign="top"
 +
! kstash
 +
| stores the KDC master password in a file.
 +
|-valign="top"
 +
! ktutil
 +
| is a program for managing Kerberos keytabs.
 +
|-valign="top"
 +
! kx
 +
| is a program which securely forwards X connections.
 +
|-valign="top"
 +
! kxd
 +
| is the daemon for kx.
 +
|-valign="top"
 +
! login
 +
| is a kerberized login program.
 +
|-valign="top"
 +
! otp
 +
| manages one-time passwords.
 +
|-valign="top"
 +
! otpprint
 +
| prints lists of one-time passwords.
 +
|-valign="top"
 +
! pfrom
 +
| is a script that runs push --from.
 +
|-valign="top"
 +
! popper
 +
| is a kerberized POP-3 server.
 +
|-valign="top"
 +
! push
 +
| is a kerberized POP mail retrieval client.
 +
|-valign="top"
 +
! rcp
 +
| is a kerberized rcp client program.
 +
|-valign="top"
 +
! rsh
 +
| is a kerberized rsh client program.
 +
|-valign="top"
 +
! rshd
 +
| is a kerberized rsh server.
 +
|-valign="top"
 +
! rxtelnet
 +
| starts a secure xterm window with a telnet to a given host and forwards X connections.
 +
|-valign="top"
 +
! rxterm
 +
| starts a secure remote xterm.
 +
|-valign="top"
 +
! string2key
 +
| maps a password into a key.
 +
|-valign="top"
 +
! su
 +
| is a kerberized su client program.
 +
|-valign="top"
 +
! telnet
 +
| is a kerberized telnet client program.
 +
|-valign="top"
 +
! telnetd
 +
| is a kerberized telnet server.
 +
|-valign="top"
 +
! tenletxr
 +
| forwards X connections backwards.
 +
|-valign="top"
 +
! verify_krb5_conf
 +
| checks krb5.conf file for obvious errors.
 +
|-valign="top"
 +
! xnlock
 +
| is a program that acts as a secure screen saver for workstations running X.
 +
|-valign="top"
 +
! libasn1.{so,a}
 +
| provides the ASN.1 and DER functions to encode and decode the Kerberos TGTs.
 +
|-valign="top"
 +
! libeditline.a
 +
| is a command-line editing library with history.
 +
|-valign="top"
 +
! libgssapi.{so,a}
 +
| 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.
 +
|-valign="top"
 +
! libhdb.{so,a}
 +
| is a Heimdal Kerberos 5 authentication/authorization database access library.
 +
|-valign="top"
 +
! libkadm5clnt.{so,a}
 +
| contains the administrative authentication and password checking functions required by Kerberos 5 client-side programs.
 +
|-valign="top"
 +
! libkadm5srv.{so,a}
 +
| contain the administrative authentication and password checking functions required by Kerberos 5 servers.
 +
|-valign="top"
 +
! libkafs.{so,a}
 +
| contains the functions required to authenticated to AFS.
 +
|-valign="top"
 +
! libkrb5.{so,a}
 +
| is an all-purpose Kerberos 5 library.
 +
|-valign="top"
 +
! libotp.{so,a}
 +
| contains the functions required to handle authenticating one time passwords.
 +
|-valign="top"
 +
! libroken.{so,a}
 +
| is a library containing Kerberos 5 compatibility functions.
 +
|}
 +
 
 +
[[Category:General Libs]]

Latest revision as of 08:59, 20 September 2009

Download Source: http://ftp.vc-graz.ac.at/mirror/crypto/kerberos/heimdal/heimdal-0.7.2.tar.gz
Download Patch: ftp://ftp.pdc.kth.se/pub/heimdal/src/heimdal-0.7.2-setuid-patch.txt
Download Patch: http://svn.cross-lfs.org/svn/repos/patches/heimdal/heimdal-0.7.2-fhs_compliance-1.patch
Download Patch (for cracklib): http://svn.cross-lfs.org/svn/repos/patches/heimdal/heimdal-0.7.2-cracklib-1.patch

Introduction to Heimdal

Heimdal is an implementation of Kerberos 5

Project Homepage: http://www.h5l.org/

Caution.png

Note

Using Heimdal instead of Kerberos will break some packages expecting kerberos.

Dependencies

Required

Reccomended

Optional

Caution.png

Note

Some sort of time synchronization facility on your system (like NTP) is required since Kerberos won't authenticate if the time differential between a kerberized client and the KDC server is more than 5 minutes.

Non-Multilib

Warning:
Ensure you really need a Kerberos installation before you decide to
install this package. Failure to install and configure the package in
accordance with the instructions below can alter your system so that
users cannot log in.

If you wish the Heimdal package to link against the CrackLib library to provide enforcement of strong passwords (requires CrackLib-2.8.9 installed with the heimdal patch), you must apply a patch:

patch -Np1 -i ../heimdal-0.7.2-cracklib-1.patch

Install Heimdal by running the following commands:

patch -Np1 -i ../heimdal-0.7.2-setuid-patch.txt &&
patch -Np1 -i ../heimdal-0.7.2-fhs_compliance-1.patch &&
./configure --prefix=/usr \
            --sysconfdir=/etc/heimdal \
            --libexecdir=/usr/sbin \
            --datadir=/var/lib/heimdal \
            --localstatedir=/var/lib/heimdal \
            --enable-shared \
            --with-readline=/usr &&
make

Now, as the root user (the following process requires Berkeley DB 4.5.*. Adjust the script if you didn't have Berkeley DB or using a different version):

mv -v /usr/include/fnmatch.h /usr/include/fnmatch.h.glibc &&
mv -v /usr/include/glob.h /usr/include/glob.h.glibc &&
mv -v /usr/include/ss/ss.h /usr/include/ss/ss.h.e2fsprogs &&
mv -v /usr/lib/libss.a /usr/lib/libss.a.e2fsprogs &&
mv -v /usr/lib/libss.so /usr/lib/libss.so.e2fsprogs &&
make install &&
mv -v /usr/include/fnmatch.h /usr/include/fnmatch.h.heimdal &&
mv -v /usr/include/fnmatch.h.glibc /usr/include/fnmatch.h &&
mv -v /usr/include/glob.h /usr/include/glob.h.heimdal &&
mv -v /usr/include/glob.h.glibc /usr/include/glob.h &&
install -v -m755 -d /usr/share/doc/heimdal-0.7.2/standardisation &&
install -v -m644 doc/{init-creds,layman.asc} \
    /usr/share/doc/heimdal-0.7.2 &&
install -v -m644 doc/standardisation/* \
    /usr/share/doc/heimdal-0.7.2/standardisation &&
mv -v /bin/login /bin/login.shadow &&
mv -v /bin/su /bin/su.shadow &&
mv -v /usr/bin/{login,su} /bin &&
ln -v -sf ../../bin/login /usr/bin &&
mv -v /usr/lib/lib{otp,kafs,krb5,asn1,roken,crypto}.so.* \
      /usr/lib/libdb-4.5.so /lib &&
ln -v -sf ../../lib/libdb-4.5.so /usr/lib/libdb.so &&
ln -v -sf ../../lib/libdb-4.5.so /usr/lib/libdb-4.so &&
for SYMLINK in otp.so.0.1.3  kafs.so.0.4.1   krb5.so.17.4.0 \
               asn1.so.6.1.0 roken.so.16.1.0 crypto.so.0.9.8
do
    ln -v -sf ../../lib/lib$SYMLINK \
        /usr/lib/lib`echo $SYMLINK | cut -d. -f1`.so
done
/sbin/ldconfig

Command Explanations

mv -v /usr/include/... and mv -v /usr/lib/libss.*: The Heimdal installation will overwrite two interface headers from the Glibc package and an interface header, static library and library symbolic link from the E2fsprogs package. These commands move the original files out of the way before the installation, and then restore the original Glibc headers after the installation. The two Heimdal headers are renamed and preserved on the system. Testing has shown that the system is stable using the Heimdal version of the libss library and interface header. Also make sure you're using the Glibc glob.h. Most packages will fail because of undefined symbols rk_glob from the Heimdal headers.

--libexecdir=/usr/sbin: This switch puts the daemon programs into /usr/sbin.

Tip:
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 -v -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 so that they can be restored if you experience problems logging into the system after the Heimdal package is installed and configured.

mv ... /lib; ln -v -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.

Multilib

TODO...

32Bit

TODO...

N32

TODO...

64Bit

TODO...

Configuration

Create the Kerberos configuration file with the following commands:

install -v -m755 -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
chmod -v 644 /etc/heimdal/krb5.conf

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 -v -m755 -d /var/lib/heimdal &&
kstash

Create the KDC database:

kadmin -l

The commands below will prompt you for information about the principles. Choose the defaults for now unless you know what you are doing and need to specify different values. You can go in later and change the defaults, should you feel the need. You may use the up and down arrow keys to use the history feature of kadmin in a similar manner as the bash history feature.

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, setup and configuration of your new Heimdal Kerberos 5 installation.

Install the /etc/rc.d/init.d/heimdal init script included in the bootscripts package:

make install-heimdal

Contents

Installed Programs: afslog, dump_log, ftp, ftpd, hprop, hpropd, ipropd-master, ipropd-slave, kadmin, kadmind, kauth, kcm, kdc, kdestroy, kf, kfd, kgetcred, kinit, klist, kpasswd, kpasswdd, krb5-config, kstash, ktutil, kx, kxd, login, mk_cmds, otp, otpprint, pagsh, pfrom, popper, push, rcp, replay_log, rsh, rshd, rxtelnet, rxterm, string2key, su, telnet, telnetd, tenletxr, truncate-log, verify_krb5_conf and xnlock
Installed Libraries: libasn1.{so,a}, libeditline.{so,a}, libgssapi.{so,a}, libhdb.{so,a}, libkadm5clnt.{so,a}, libkadm5srv.{so,a}, libkafs.{so,a}, libkrb5.{so,a}, libotp.{so,a}, libroken.{so,a}, libsl.{so,a} and libss.{so,a}
Installed Directories: /etc/heimdal, /usr/include/kadm5, /usr/share/doc/heimdal-0.7.2 and /var/lib/heimdal

Short Descriptions

afslog obtains AFS tokens for a number of cells.
ftp is a kerberized FTP client.
ftpd is a kerberized FTP daemon.
hprop takes a principal database in a specified format and converts it into a stream of Heimdal database records.
hpropd is a server that receives a database sent by hprop and writes it as a local database.
ipropd-master is a daemon which runs on the master KDC server which incrementally propagates changes to the KDC database to the slave KDC servers.
ipropd-slave is a daemon which runs on the slave KDC servers which incrementally propagates changes to the KDC database from the master KDC server.
kadmin is a utility used to make modifications to the Kerberos database.
kadmind is a server for administrative access to the Kerberos database.
kauth is a symbolic link to the kinit program.
kcm is a process based credential cache for Kerberos tickets.
kdc is a Kerberos 5 server.
kdestroy removes a principle's current set of tickets.
kf is a program which forwards tickets to a remote host through an authenticated and encrypted stream.
kfd is a server used to receive forwarded tickets.
kgetcred obtains a ticket for a service.
kinit 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.
klist reads and displays the current tickets in the credential cache.
kpasswd is a program for changing Kerberos 5 passwords.
kpasswdd is a Kerberos 5 password changing server.
krb5-config gives information on how to link programs against Heimdal libraries.
kstash stores the KDC master password in a file.
ktutil is a program for managing Kerberos keytabs.
kx is a program which securely forwards X connections.
kxd is the daemon for kx.
login is a kerberized login program.
otp manages one-time passwords.
otpprint prints lists of one-time passwords.
pfrom is a script that runs push --from.
popper is a kerberized POP-3 server.
push is a kerberized POP mail retrieval client.
rcp is a kerberized rcp client program.
rsh is a kerberized rsh client program.
rshd is a kerberized rsh server.
rxtelnet starts a secure xterm window with a telnet to a given host and forwards X connections.
rxterm starts a secure remote xterm.
string2key maps a password into a key.
su is a kerberized su client program.
telnet is a kerberized telnet client program.
telnetd is a kerberized telnet server.
tenletxr forwards X connections backwards.
verify_krb5_conf checks krb5.conf file for obvious errors.
xnlock is a program that acts as a secure screen saver for workstations running X.
libasn1.{so,a} provides the ASN.1 and DER functions to encode and decode the Kerberos TGTs.
libeditline.a is a command-line editing library with history.
libgssapi.{so,a} 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.
libhdb.{so,a} is a Heimdal Kerberos 5 authentication/authorization database access library.
libkadm5clnt.{so,a} contains the administrative authentication and password checking functions required by Kerberos 5 client-side programs.
libkadm5srv.{so,a} contain the administrative authentication and password checking functions required by Kerberos 5 servers.
libkafs.{so,a} contains the functions required to authenticated to AFS.
libkrb5.{so,a} is an all-purpose Kerberos 5 library.
libotp.{so,a} contains the functions required to handle authenticating one time passwords.
libroken.{so,a} is a library containing Kerberos 5 compatibility functions.
Retrieved from "?title=Heimdal&oldid=19261"