Kerberos setup
Kerberos setup
Le indicazioni base sono nel Kerberos infrastructure howto.
Il sistema di riferimento è GNU/Linux Debian Etch. L'esempio è sviluppato con solo PC, pinss9.unimo.it, che funziona sia da client che da server.
Si è scelto Heimdal Kerberos invece di MIT Kerberos perché è la versione usata per samba4 e permette di usare OpenLDAP come backend.
apt-get install heimdal-servers heimdal-clients heimdal-kcm heimdal-kdc
Il file di configurazione /etc/krb5.conf nella prima ipotesi è:
[libdefaults]
default_realm = PINSS9.UNIMO.IT
# The following krb5.conf variables are only for MIT Kerberos.
krb4_config = /etc/krb.conf
krb4_realms = /etc/krb.realms
kdc_timesync = 1
ccache_type = 4
forwardable = true
proxiable = true
# The following encryption type specification will be used by MIT Kerberos
# if uncommented. In general, the defaults in the MIT Kerberos code are
# correct and overriding these specifications only serves to disable new
# encryption types as they are added, creating interoperability problems.
# default_tgs_enctypes = aes256-cts arcfour-hmac-md5 des3-hmac-sha1 des-cbc-crc des-cbc-md5
# default_tkt_enctypes = aes256-cts arcfour-hmac-md5 des3-hmac-sha1 des-cbc-crc des-cbc-md5
# permitted_enctypes = aes256-cts arcfour-hmac-md5 des3-hmac-sha1 des-cbc-crc des-cbc-md5
# The following libdefaults parameters are only for Heimdal Kerberos.
v4_instance_resolve = false
v4_name_convert = {
host = {
rcmd = host
ftp = ftp
}
plain = {
something = something-else
}
}
fcc-mit-ticketflags = true
[realms]
PINSS9.UNIMO.IT = {
kdc = pinss9.unimo.it
admin_server = pinss9.unimo.it
}
[domain_realm]
.unimo.it = PINSS9.UNIMO.IT
unimo.it = PINSS9.UNIMO.IT
[login]
krb4_convert = true
krb4_get_tickets = false
In coda all'installazione la KDC master password è salvata nel file /var/lib/heimdal-kdc/m-key.
pinss9:~# kadmin -l stash Master key: Verifying - Master key: kadmin: writing key to "/var/lib/heimdal-kdc/m-key"
Si crea il principale admin/admin ed un utente, francesco, con:
pinss9:~# kadmin -l kadmin> init PINSS9.UNIMO.IT ... kadmin> add francesco ...
Il test:
francesco@pinss9:~$ kinit
francesco@PINSS9.UNIMO.IT's Password:
francesco@pinss9:~$ klist
Credentials cache: FILE:/tmp/krb5cc_1014
Principal: francesco@PINSS9.UNIMO.IT
Issued Expires Principal
Dec 22 11:01:58 Dec 22 21:01:58 krbtgt/PINSS9.UNIMO.IT@PINSS9.UNIMO.IT
--Malvezzi 09:42, 22 December 2006 (CET)