Hide Forgot
Description of problem: When /etc/krb5.keytab contains only des-cbc-crc, des-cbc-md5, and arcfour-hmac keys and the KDC supports AES, kinit -k -t /etc/krb5.keytab fails. Quoting Nalin: " The client is sending a request in both cases, but when the KDC encrypts its reply to the client, it uses an AES key if the client says that it supports AES. But the client doesn't have a key of that type in the keytab, so the client can't decrypt the server's reply. This is indeed what's happening (though the error's hit when the client tries to use the key of the agreed-upon type to generate preauth data). It's a bug, alright. " Version-Release number of selected component (if applicable): RHEL 6.1
Note that this works perfectly on RHEL 5.7.
Also note that this issue comes up only with AD 2008R2 not AD 2003R2. The workaround is to add to krb5.conf the following lines under [libdefaults]: default_tkt_enctypes = rc4-hmac des-cbc-crc des-cbc-md5 default_tgs_enctypes = rc4-hmac des-cbc-crc des-cbc-md5 See https://bugzilla.redhat.com/show_bug.cgi?id=748407 for related discussion.
(In reply to comment #3) > Note that this works perfectly on RHEL 5.7. I tried to set up a baseline working version with krb5-1.6.1-70.el5 and samba-3.0.33-3.38.el5_8 and was not able to do so without the workaround Marko described. Just in case, I tried rolling back to krb5-1.6.1-62.el5, which was the version used in 5.7, and the same error occurred. Ondrej, is there a Samba setting or some other tweak that you made to get your setup to work correctly in combination with Server 2008?
No tweaks/special settings were necessary on RHEL5.7 with Windows server 2008.
(In reply to comment #12) > No tweaks/special settings were necessary on RHEL5.7 with Windows server 2008. Can you attach with the output of "klist -k -e -t /path/to/keytab" and a packet capture of the traffic between the client and the KDC (captured with tcpdump -s 0 or equivalent)? One of both of those should help isolate what's happening that isn't happening in my test setup.
Yikes, let me try that again. Can you attach the output of 'klist -k -e' for the keytab you're using, along with a packet capture of the traffic between the client and the KDC (captured with 'tcpdump -s 0' or an equivalent) when you run 'kinit -k'? One or both of those should shed some light on what's happening on your systems that isn't happening on mine.
Hi Nalin, I'm happy to confirm that the issue which was still present with krb5-1.9-22.el6 is now solved with krb5-1.9-28.el6. Thanks!
Will this fix find its way to upstream, too? Fedora 17 (krb5-workstation-1.10-6.fc17.x86_64) is still broken Thanks!
I'm leaning more to preferring Stef's approach from ticket #2131, which also works correctly when pre-authentication isn't used. I expect the Fedora update will look more like a backport of that.
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. http://rhn.redhat.com/errata/RHBA-2012-0921.html