Heimdal-0.6.2

Introduction à Heimdal

Heimdal est une implémentation libre de Kerberos 5 dont le but est d'être compatible avec MIT krb5 et est compatible avec krb4. Kerberos est un protocole d'authentification réseau. Simplement, il préserve l'intégrité des mots de passe dans un réseau sans confiance. Les applications compatibles fonctionnent main dans la main avec les sites qui supportent Kerberos pour s'assurer que les mots de passe n'ont pas été volés. Une installation Kerberos modifiera les mécanismes d'authentication sur votre réseau et écrasera plusieurs programmes et démons provenant des paquetages Coreutils, Inetutils, Qpopper et Shadow.

Informations sur le paquetage

Dépendances de Heimdal

Optionnel

readline-4.3, Linux_PAM-0.77, OpenLDAP-2.1.30, X (X.org-6.7.0 ou XFree86-4.4.0), cracklib-2.7 et krb4

[Note]

Note

Une synchronisation de temps sur votre système (comme NTP-4.2.0) est requise car Kerberos n'authentifiera pas si la différence de temps entre le client et le serveur KDC est supérieur à cinq minutes.

Installation de Heimdal

Avant d'installer le paquetage, vous pouvez vouloir préserver le programme ftp du paquetage Inetutils. C'est dût au fait qu'utiliser le programme ftp Heimdal pour se connecter à des serveurs ftp non compatibles avec Kerberos pourrait ne pas fonctionner correctement. Cela vous permettra de vous connecter (en vous indiquant que la transmission du mot de passe se fait en clair) mais vous aurez des problèmes avec les commandes puts et gets.

mv /usr/bin/ftp /usr/bin/ftpn

Si vous souhaitez lier le paquetage Heimdal avec la bibliothèque cracklib, vous devez appliquer un correctif :

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

Installez Heimdal en lançant les commande suivantes :

patch -Np1 -i ../heimdal-0.6.2-fhs-compliance-1.patch &&
./configure --prefix=/usr --sysconfdir=/etc/heimdal \
    --datadir=/var/lib/heimdal --libexecdir=/usr/sbin \
    --sharedstatedir=/usr/share --localstatedir=/var/lib/heimdal \
    --enable-shared --with-openssl=/usr &&
make &&
make install &&
mv /bin/login /bin/login.shadow &&
mv /bin/su /bin/su.coreutils &&
mv /usr/bin/{login,su} /bin &&
ln -sf ../../bin/login /usr/bin &&
mv /usr/lib/lib{otp.so.0,otp.so.0.1.4,kafs.so.0,kafs.so.0.4.0} /lib &&
mv /usr/lib/lib{krb5.so.17,krb5.so.17.3.0,asn1.so.6,asn1.so.6.0.2} /lib &&
mv /usr/lib/lib{roken.so.16,roken.so.16.0.3,crypto.so.0.9.7} /lib &&
mv /usr/lib/lib{com_err.so.2,com_err.so.2.1,db-4.1.so} /lib &&
ln -sf ../../lib/lib{otp.so.0,otp.so.0.1.4,kafs.so.0,kafs.so.0.4.0} /usr/lib &&
ln -sf ../../lib/lib{krb5.so.17,krb5.so.17.3.0,asn1.so.6,asn1.so.6.0.2} /usr/lib &&
ln -sf ../../lib/lib{roken.so.16,roken.so.16.0.3,crypto.so.0.9.7} /usr/lib &&
ln -sf ../../lib/lib{com_err.so.2,com_err.so.2.1,db-4.1.so} /usr/lib &&
ldconfig

Explication des commandes

--libexecdir=/usr/sbin : cette option place les programmes démons dans /usr/sbin.

[Note]

Note

Si vous souhaitez préserver tous les démons existants du paquetage Inetutils, installez les démons Heimdal dans /usr/sbin/heimdal (ou là où vous le souhaitez). Comme ces programmes seront appelés à partir de (x)inetd ou des scripts rc, peu importe où ils sont stockés du moment qu'ils sont correctement désignés dans le fichier /etc/(x)inetd.conf et dans les scripts rc. Si vous choisissez quelque chose d'autre que /usr/sbin, vous pourriez vouloir déplacer quelques programmes utilisateur (comme kadmin) vers /usr/sbin manuellement.

mv /bin/login /bin/login.shadow
mv /bin/su /bin/su.coreutils
mv /usr/bin/{login,su} /bin
ln -sf ../../bin/login /usr/bin

Les programmes login et su installés par Heimdal appartiennent au répertoire /bin. Le programme login est lié symboliquement parce qu'Heimdal s'attend à le trouver dans /usr/bin. Nous préservons les anciens exécutables avant le déplacement pour conserver un état sain si des problèmes devaient apparaître.

mv /usr/lib/lib{otp.so.0,otp.so.0.1.4,kafs.so.0,kafs.so.0.4.0} /lib
mv /usr/lib/lib{krb5.so.17,krb5.so.17.3.0,asn1.so.6,asn1.so.6.0.2} /lib
mv /usr/lib/lib{roken.so.16,roken.so.16.0.3,crypto.so.0.9.7} /lib
mv /usr/lib/lib{com_err.so.2,com_err.so.2.1,db-4.1.so} /lib
ln -sf ../../lib/lib{otp.so.0,otp.so.0.1.4,kafs.so.0,kafs.so.0.4.0} /usr/lib
ln -sf ../../lib/lib{krb5.so.17,krb5.so.17.3.0,asn1.so.6,asn1.so.6.0.2} /usr/lib
ln -sf ../../lib/lib{roken.so.16,roken.so.16.0.3,crypto.so.0.9.7} /usr/lib
ln -sf ../../lib/lib{com_err.so.2,com_err.so.2.1,db-4.1.so} /usr/lib

Les programmes login et su installés par Heimdal sont liés avec les bibliothèques Heimdal ainsi que les bibliothèques crypto et db. Nous déplaçons ces bibliothèques vers /lib pour être compatible avec FHS et dans le cas où /usr est situé sur une partition séparée qui pourrait ne pas être montée.

Configuring Heimdal

Config files

/etc/heimdal/*

Configuration Information

Master KDC Server Configuration

Create the Kerberos configuration file with the following command:

install -d /etc/heimdal &&
cat > /etc/heimdal/krb5.conf << "EOF"
# Begin /etc/heimdal/krb5.conf
        
[libdefaults]
    default_realm = [LFS.ORG]
    encrypt = true

[realms]
    [LFS.ORG] = {
        kdc = [belgarath.lfs.org]
        admin_server = [belgarath.lfs.org]
        kpasswd_server = [belgarath.lfs.org]
    }

[domain_realm]
    .[lfs.org] = [LFS.ORG]

[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 occurances of the belgarath and lfs.org 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.

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 [LFS.ORG]

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

add [loginname]

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

add --random-key host/[belgarath.lfs.org]

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

ext host/[belgarath.lfs.org]

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/[belgarath.lfs.org]

(choose the defaults)

ext ftp/[belgarath.lfs.org]

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 /etc/rc.d/init.d/heimdal init script included in the blfs-bootscripts-5.1 package.

make install-heimdal
Using Kerberized Client Programs

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.

For additional information consult the Heimdal hint on which the above instructions are based.

Contenu

Le paquetage Heimdal contient afslog, dump_log, ftp, ftpd, hprop, hpropd, ipropd-master, ipropd-slave, kadmin, kadmind, kauth, 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, xnlock, libasn1, libeditline, libgssapi, libhdb, libkadm5clnt, libkadm5srv, libkafs, libkrb5, libotp, libroken, libsl et libss.

Description

afslog

afslog obtient des marques AFS pour un nombre de cellules.

hprop

hprop prend une base de données principale dans un format spécifique et la convertit en un flux d'enregistrements pour une base de données Heimdal.

hpropd

hpropd reçoit une base de données envoyée par hprop et l'écrit en tant que base de données locale.

kadmin

kadmin est un outil utilisé pour faire des modifications sur la base de données Kerberos.

kadmind

kadmind est un serveur pour l'accès administratif à la base de données Kerberos.

kauth, kinit

kauth et kinit sont utilisés pour s'authentifier sur le serveur Kerberos et pour acquérir un ticket qui pourra être utilisé pour obtenir des tickets pour d'autres services.

kdc

kdc est un serveur Kerberos 5.

kdestroy

kdestroy supprime l'ensemble actuel de tickets.

kf

kf est un programme qui envoit des tickets vers un hôte distant à travers un flux authentifié et crypté.

kfd

kfd reçoit des tickets.

kgetcred

kgetcred obtient un ticket pour un service.

klist

klist lit et affiche les tickets actuels dans le cache crédentiel.

kpasswd

kpasswd est un programme de changement de mots de passe Kerberos 5.

kpasswdd

kpasswdd est un serveur de modification de mots de passe Kerberos 5.

krb5-config

krb5-config donne des informations sur la façon de lier des programmes aux bibliothèques Heimdal.

kstash

kstash stocke le mot de passe principal de KDC dans un fichier.

ktutil

ktutil est un programme de gestion des « keytabs » Kerberos.

kx

kx est un programme qui transfère les connexions X de façon sécurisée.

kxd

kxd est le démon pour kx.

otp

otp gère des mots de passe qui ne serviront qu'une fois (« jetables »).

otpprint

otpprint affiche des listes de mots de passe jetables.

rxtelnet

Le programme rxtelnet lance une fenêtre xterm avec un telnet vers l'hôte donné et renvoit les connexions X.

rxterm

rxterm lance un xterm distant et sécurisé.

string2key

string2key fait correspondre une clé à un mot de passe.

tenletxr

tenletxr inverse les connexions X.

verify_krb5_conf

verify_krb5_conf vérifie le fichier krb5.conf pour les erreurs évidentes.

xnlock

xnlock est un programme qui agit comme écran de veille sécurisé pour les stations de travail sous X.