You can make a difference in the Apple Support Community!

When you sign up with your Apple Account, you can provide valuable feedback to other community members by upvoting helpful replies and User Tips.

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Does anyone know how to configure Kerberos with Lion?

It was bad enough that kerberos changed from 10.5 to 10.6, but now they've completely removed MIT Kerberos and replaced it with Heimdal in 10.7. So my existing kerberos configuration, which worked great in 10.6, no longer works in 10.7. This is a real show-stopper for me, until I can find some docs or other information on how to configure OS X as a kerberos client (the KDC is a Red Hat Enterprise Linux box).


Has anyone figured out how to do this? Whenever I try to get a ticket, it tells me that it cannot reach the KDC, but it's failing so fast that I don't think it's even trying to actually talk to my KDC (and I see no traffic to the KDC), so I don't think it knows the address for the KDC. According to the Heimdal manpages and other information, the /etc/krb5.conf file should be where this is defined, and the format should be the same as an MIT Kerberos client, but it just keeps failing miserably.


Any pointers would be highly appreciated!

Posted on Jul 20, 2011 7:54 AM

Reply
49 replies

Jul 24, 2011 9:37 PM in response to hmolina

hmolina wrote:

To activate the kerberos ticket request at login in the MacOS Lion (Server or standalone), you can modify the /etc/authorization file making the follow changes:


This does not seem to be needed anymore: Since Lion, the system login uses PAM, the PAM stack that is run on login is /etc/pam.d/authorization. In this PAM stack, there is pam_krb5 that takes care of requesting a kerberos ticket for the user.

Jul 25, 2011 2:29 PM in response to davidbr

My Kerberos server(s) are MIT kerberos. When I use "tcp/<server>", I'm unable to get tickets. When I removed the "tcp/" I was able to obtain tickets.


The big thing that did the trick for me: Removal of quotation marks from the krb5.conf file. My (old) edu.mit.Kerberos config file used things like:

proxiable = "true"


Removal of the quotation marks made all the difference.

Jul 26, 2011 2:36 AM in response to hmolina

hmolina wrote:

Yes, in theory, with PAM stack I do not have to make that changes... but in the real world the Kerberos in PAM stack is not working :-s (I test it before write this lines)

It works for me (I do test, too): pam_krb5 gets Kerberos tickets without the changes to /etc/authorization.


By the way, Apple recommends to use the PAM stack when I've tested your changes to /etc/authorization, see system.log:

authorizationhost[327]: The builtin:krb5authnoverify authorization mechanism has been deprecated. Please configure the authorization PAM stack (/etc/pam.d/authorization) as needed, and use builtin:authenticate mechanism instead.

Jul 27, 2011 1:02 PM in response to Vincent Danen

I ran into this problem with our MIT KDC and finally fixed the issue by adding

allow_weak_crypto = true

to the libdefaults in /Library/Preferences/edu.mit.Kerberos

Credit goes to:

http://www.gurucollege.net/blog/tag/kerberos/


Also got the /etc/pam.d/authorization to cache the tgt by changing to config for pam_krb5 to:

auth optional pam_krb5.so use_first_pass use_kcminit default_principal


Cache is made in something like API:503:11 but I can't get the KRB5CCNAME set by pam_sm_setcred()

See: man pam_krb5.

Anyone got this to work?

Jul 27, 2011 10:32 PM in response to efromraleigh

That finally helped to let me mount nfsv3 again. I now have the same behaviour than antst above. My libdefaults-section in /etc/krb5.conf now looks like this:


[libdefaults]

default_realm = ...

default_etypes = arcfour-hmac-md5

default_etypes_des = des-cbc-md5,des-cbc-crc

default_tgs_enctypes = des-cbc-md5,des-cbc-crc

default_tkt_enctypes = des-cbc-md5,des-cbc-crc

permitted_enctypes = des-cbc-md5,des-cbc-crc

allow_weak_crypto = true


The strange thing is, I had the allow_weak_crypto = true directive in the very beginning of my tests (since we use it on ubuntu). It did not help, however, because I then did not have default_etypes and default_etypes_des set (both of which do not exist in MIT-Kerberos). The latter, however, uses default_tgs_enctypes , default_tkt_enctypes and permitted_enctypes (which are not mentioned in the man page to krb5.conf in Lion- so I removed them after my first attempts). This is the first time I have all those statements in my krb5.conf.


Thanks to efromraleigh and antst.


Apple should really update their man-pages to reflect all directives in krb5.conf. Heimdal-docs on the net are somewhat opaque either....

Aug 3, 2011 6:25 AM in response to bernerus

I have done some testing against cups 1.3.3 with AuthNegotiate. Lion wants ipp v2 but will drop back to 1.1. The cups is the latest 1.5.0 and my logs on the local mac show update required talking to the 1.3.3 cups server on RedHat Linux. Waiting on my folks to update our test CUPS server for further testing.

In short, I did not get kerberized printing to work with our servers out of the box the way it did in 10.6.x

I have not tried any other servers.

Aug 3, 2011 6:35 AM in response to efromraleigh

To follow on I was able to get tickets and make openafs work. After a couple of reboots the KRB5CCNAME is set correctly. Also if you have multiple realms like a MIT server and active directory you can craft a edu.mit.Kerberos (krb5.conf) file that has both in it. Use klist -A to see all the cred. caches. Also note that klist -l will show a simple list of caches like:

Name Cache name Expires

* user@REALMONE.COM 501:7 Aug 3 19:30:55


user@REALMTWO.COM 501:5 Aug 3 17:36:39


The * indicates the default cache.

Also kswitch -p $USER@REALMTWO.COM works to change the default on the fly incase folks are scripting.

Aug 3, 2011 10:17 AM in response to bernerus

bernerus wrote:


Anyone trying kerberos for printing?

Yes. Me.


I use the LPRng "lpr" command in our printing system.


I have managed to figure out how to build LPRng under 10.6 in such a way that it

works under 10.5 Intel/ppc, 10.6 Intel, and 10.7. However, under 10.7 it works

only if I disable Kerberos encryption of the print job data, and do not use

cross-realm authentication. The former doesn't bother me much. The second is

seriously annoying.

Does anyone know how to configure Kerberos with Lion?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.