MIT krb5-1.3.3

Introduction à MIT krb5

MIT krb5 est une implémentation libre de Kerberos 5. Kerberos est un protocole d'authentication réseau. Il centralise la base de données d'authentication et utilise des applications compatibles pour fonctionner avec les serveurs ou services qui supportent Kerberos permettant des connexions simples et une communication cryptée dans les réseaux internes ou sur Internet.

Informations sur le paquetage

Dépendances de MIT krb5

Optionnel

xinetd-2.3.13 (serveurs de services uniquement), Linux_PAM-0.77 (pour les connexions basées sur xdm) et OpenLDAP-2.1.30 (alternative à la base de données krb5kdc)

[Note]

Note

Une synchronisation du temps sur votre système (comme NTP-4.2.0) est requise car Kerberos n'authentifiera pas s'il existe une différence de temps entre le client et le serveur KDC.

Installation de MIT krb5

Installez MIT krb5 en lançant les commande suivantes :

./configure --prefix=/usr --sysconfdir=/etc \
    --localstatedir=/var/lib --enable-dns --enable-shared --mandir=/usr/share/man &&
make &&
make install &&
mv /bin/login /bin/login.shadow &&
cp /usr/sbin/login.krb5 /bin/login &&
mv /usr/bin/ksu /bin &&
mv /usr/lib/libkrb5.so.3* /lib &&
mv /usr/lib/libkrb4.so.2* /lib &&
mv /usr/lib/libdes425.so.3* /lib &&
mv /usr/lib/libk5crypto.so.3* /lib &&
mv /usr/lib/libcom_err.so.3* /lib &&
ln -sf ../../lib/libkrb5.so /usr/lib &&
ln -sf ../../lib/libkrb4.so /usr/lib &&
ln -sf ../../lib/libdes425.so /usr/lib &&
ln -sf ../../lib/libk5crypto.so /usr/lib &&
ln -sf ../../lib/libcom_err.so /usr/lib &&
ldconfig

Explication des commandes

--enable-dns : cette option permet aux domaines d'être résolu en utilisant le serveur DNS.

mv /bin/login /bin/login.shadow
cp /usr/sbin/login.krb5 /bin/login
mv /usr/bin/ksu /bin

conserve la commande login de Shadow, déplace ksu et login dans le répertoire /bin.

mv /usr/lib/libkrb5.so.3* /lib
mv /usr/lib/libkrb4.so.2* /lib
mv /usr/lib/libdes425.so.3* /lib
mv /usr/lib/libk5crypto.so.3* /lib
mv /usr/lib/libcom_err.so.3* /lib
ln -sf ../../lib/libkrb5.so /usr/lib
ln -sf ../../lib/libkrb4.so /usr/lib
ln -sf ../../lib/libdes425.so /usr/lib
ln -sf ../../lib/libk5crypto.so /usr/lib
ln -sf ../../lib/libcom_err.so /usr/lib

Les programmes login et ksu sont liés avec ces bibliothèques, donc nous déplaçons ces bibliothèques dans /lib pour permettre des connexions sans monter /usr.

Configuring MIT krb5

Config files

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

Configuration Information

Kerberos Configuration

Create the Kerberos configuration file with the following command:

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

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

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

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

# End /etc/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.

Create the KDC database:

kdb5_util create -r [LFS.ORG] -s 

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

kadmin.local
kadmin:addprinc [loginname]

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

kadmin:addprinc --randkey host/[belgarath.lfs.org]

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

kadmin:ktadd host/[belgarath.lfs.org]

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

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

kadmin:addprinc --randkey ftp/[belgarath.lfs.org]
kadmin:ktadd 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/krb5kdc &

Attempt to get a ticket with the following command:

kinit [loginname]

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

klist

Information about the ticket should be displayed on the screen.

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

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

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

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

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

make install-kerberos
Using Kerberized Client Programs

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

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

Using Kerberized Server Programs

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

Additional Information

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

Contenu

Le paquetage MIT krb5 contient compile-et, ftp, ftpd, gss-client, gss-server, k5srvutil, kadmin, kadmin.local, kadmind, kadmind4, kdb5_util kdestroy, kinit, klist, klogind, kpasswd, kprop, kpropd, krb5-send-pr, krb5-config, krb524d, krb524init, krb5kdc, kshd, ksu, ktutil, kvno, login.krb5, rcp, rlogin, rsh, rshd, rxtelnet, rxterm, sclient, sim_client, sim_server, sserver, telnet, telnetd, uuclient, uuserver, v5passwd, v5passwdd, libcom_err, libdes425, libgssapi, libgssrpc, lib5crypto, libkadm5clnt, libkadm5srv, libkdb5, libkrb4, libkrb5.

Description

compile_et

compile_et convertit la table donnant les noms des codes d'erreurs dans un fichier source C.

k5srvutil

k5srvutil est un outil de manipulation de tables d'hôte.

kadmin

kadmin est un outil faisant des modifications sur la base de données Kerberos.

kadmind

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

kinit

kinit est utilisé pour s'authentifier auprès du serveur Kerberos et aquiert un ticket qui pourra ensuite être utilisé pour obtenir des tickets d'autres services.

krb5kdc

kdc est un serveur Kerberos 5.

kdestroy

kdestroy supprime l'ensemble actuel des tickets.

kdb5_util

kdb5_util est l'outil KDC de la base de données.

klist

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

klogind

klogind est le serveur qui répond aux demandes de connexion.

kpasswd

kpasswd est un programme pour changer les mots de passe Kerberos 5.

kprop

kprop prend une base de données principale dans un format spécifié et la convertit dans un flux d'enregistrements de base de données Heimdal.

kpropd

kpropd reçoit une base de données envoyée par hprop et l'écrit dans une base de données locale.

krb5-config

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

ksu

ksu est le programme superutilisateur utilisant le protocole Kerberos. Requiert un /etc/shells et un ~/.k5login bien configurés, contenant les principaux autorisés à devenir superutilisateurs.

ktutil

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

kvno

kvno affiche les numéros de version de clés des Kerberos principaux.