Bonjour à tous,
je suis sous UBuntu 14.04 server x64 et j'aimerais installé l'application mskutils pour l'utiliser à des fin de login sur AD windows server 2008r2 pour SQUID3
je trouve mon tuto sur le site officiel de suid3 :
http://wiki.squid-cache.org/ConfigEx...Authentication
Sur ma ubuntu Server 14.04 x64, j'install en premier l'outil kerberos et je le configure :
sudo apt-get install krb5-user libkrb5-3
je modifie le fichier avec mon domaine windows :
sudo mv /etc/krb5.conf /etc//etc/krb5.conf_bak
et j'ajoute :
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
| [libdefaults]
default_realm = MONDOMAINE.COM
dns_lookup_kdc = no
dns_lookup_realm = no
ticket_lifetime = 24h
default_keytab_name = /etc/squid3/PROXY.keytab
; for Windows 2008 with AES
default_tgs_enctypes = aes256-cts-hmac-sha1-96 rc4-hmac des-cbc-crc des-cbc-md5
default_tkt_enctypes = aes256-cts-hmac-sha1-96 rc4-hmac des-cbc-crc des-cbc-md5
permitted_enctypes = aes256-cts-hmac-sha1-96 rc4-hmac des-cbc-crc des-cbc-md5
[realms]
MONDOMAINE.COM = {
kdc = ad.mondomaine.com
admin_server = ad.mondomaine.com
default_domain = mondomaine.com
}
[domain_realm]
.mondomaine.com = MONDOMAINE.COM
mondomaine.com = MONDOMAINE.COM |
du coup la je test ma config kerberos en réalisant une connexion avec le compte administrateur du domaine :
1 2 3
| mika2008[~] > kinit administrateur
Password for administrateur@MONDOMAINE.COM:
mika2008 [~] > |
je vérifie que c'est ok avec un klist :
1 2 3 4 5 6 7 8
| mika2008 [~] > klist
Ticket cache: FILE:/tmp/krb5cc_1000
Default principal: administrateur@MONDOMAINE.COM
Valid starting Expires Service principal
10/10/2014 10:32:57 10/10/2014 20:32:57 krbtgt/MONDOMAINE.COM@MONDOMAINE.COM
renew until 11/10/2014 10:32:54
mika2008 [~] > |
jusque la c'est OK.
maintenant j'install msktutil :
1 2
|
sudo apt-get install libsasl2-modules-gssapi-mit libsasl2-modules |
sudo apt-get install msktutil
et la c'est le drame :
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
|
mika2008 [~] > sudo msktutil -c -b "CN=COMPUTERS" -s HTTP/proxy.mondomaine.com-k /etc/squid3/PROXY.keytab --computer-name PROXY-K --upn HTTP/proxy.mondomaine.com --server AD.mondomaine.com --verbose --enctypes 28xcc
-- init_password: Wiping the computer password structure
-- generate_new_password: Generating a new, random password for the computer account
-- generate_new_password: Characters read from /dev/udandom = 84
-- create_fake_krb5_conf: Created a fake krb5.conf file: /tmp/.msktkrb5.conf-Dh1dNV
-- reload: Reloading Kerberos Context
-- finalize_exec: SAM Account Name is: PROXY-K$
-- try_machine_keytab_princ: Trying to authenticate for PROXY-K$ from local keytab...
-- try_machine_keytab_princ: Error: krb5_get_init_creds_keytab failed (No such file or directory)
-- try_machine_keytab_princ: Authentication with keytab failed
-- try_machine_keytab_princ: Trying to authenticate for host/proxy from local keytab...
-- try_machine_keytab_princ: Error: krb5_get_init_creds_keytab failed (Client not found in Kerberos database)
-- try_machine_keytab_princ: Authentication with keytab failed
-- try_machine_password: Trying to authenticate for PROXY-K$ with password.
-- create_default_machine_password: Default machine password for PROXY-K$ is proxy-k
-- try_machine_password: Error: krb5_get_init_creds_keytab failed (Preauthentication failed)
-- try_machine_password: Authentication with password failed
-- try_user_creds: Checking if default ticket cache has tickets...
-- try_user_creds: Error: krb5_cc_get_principal failed (No credentials cache found)
-- try_user_creds: User ticket cache was not valid.
Error: could not find any credentials to authenticate with. Neither keytab,
default machine password, nor calling user's tickets worked. Try
"kinit"ing yourself some tickets with permission to create computer
objects, or pre-creating the computer object in AD and selecting
'reset account'.
-- ~KRB5Context: Destroying Kerberos Context
mika2008 [~] > |
donc le problème c'est que l’application mskutil est censé créer un fichier /etc/squid3/PROXY.keytab
mais ça ne fonctionne pas, et je ne comprend pas pourquoi car mon fichier kerberos fonctionne puisque je peux me connecter avec un utilisateur du domaine.
que faire svp, je suis bloqué ?
Partager