kinit takes about 12 seconds to authorize a user

I am being told that there is a problem with my Open Directory config. They tell me to type kinit myusernamehere at the terminal and see if it asks for a password instantly or if there's a delay. There is a delay of about 12 seconds.

Can someone help me fix this? It is causing an unacceptable delay with OD users when they are logging in.

Message was edited by: TC10284

Macbook, Mac OS X (10.6.2)

Posted on Mar 12, 2010 3:22 PM

Reply
11 replies

Mar 12, 2010 7:37 PM in response to TC10284

So far I think it is fixed, after a long journey of Googling and messing.
So far...

I had to:
Promote my east coast OD replica to an Open Directory Master.
Destroy the OD Master on the west coast.
sudo rm /etc/krb5.keytab
Restart west coast.
Promote west coast to replica of east.
Promote west coast to OD Master.
Destroy east coast OD.
Promote east coast to replica of west.
So far kinit is nearly instant now.

Before removing the krb5.keytab file, I catted it and noticed a lot of old hostname entries in it.

Mar 14, 2010 8:44 AM in response to TC10284

One issue I did have with this method is that Kerio Connect would not let me login via the Administration Console using the administrator username/pass. I had to uninstall it and all configs then reinstall to get it to allow me to login to the Admin console again. This didn't matter much as I didn't have very much configured in Kerio Connect.

Be aware of that before you try this.

Mar 15, 2010 5:55 PM in response to Ross_CCTA

Roughly the same effect, but not exactly -- without knowing what's causing the problem, it's rather hard to tell exactly what'll fix it.

One thing occurs to me: check the file /Library/Preferences/edu.mit.Kerberos, and see what's listed as the kdc address (in the \[realms\] section, not in \[logging\]). Under some circumstances, this can get bogus entries listed, which means the clients may need to make several tries before finding a valid address for the KDC.

If that's the problem, destroying & repromoting should fix it, as would swapping replicas. Or, if you're feeling daring (and have backups of everything important), you could try to edit it directly: In Workgroup Manager's preferences, enable 'Show "All Records" tab and inspector, then select "All Records" (the bullseye tab that just appeared to the right of users, groups, computers, and computer groups tabs), then "Config" from the pop-up menu under that, then KerberosClient from the list under that, then "XMLPlist" on the right, then "Edit" below that (if you don't have an Edit button, you may need to authenticate to the domain first). You're now editing the XML property list that edu.mit.Kerberos is created from (maybe you should copy it into a text file in case something goes wrong); you need to remove bogus entries from the arrays under the KADM_List and KDC_List keys, then increase the generationID by one. Then run "sudo kerberosautoconfig" on a client to force it to update, and test again.

Mar 17, 2010 8:59 AM in response to Gordon Davisson

I catted the edu.mit.Kerberos file and didn't see any bogus entries or anything unusual.

I ended up doing a complete reinstall of the server, which solved the problem...mostly.

As far as user logons, everything is running smoothly. Kinit requests a password pretty much instantly after the command is executed. However, after the 10.6.2 update was applied, it takes me a good minute to log in to workgroup manager as diradmin. If I log on as an administrator, it logs in instantly, but then requires a good minute to authenticate me as diradmin when I click the lock icon to make changes. 10.6.0 was instant when I did this. So I'm wondering if this is a bug in 10.6.2.

As long as this does not affect the user logon experience, I can live with it. It's quite irritating, though.

Mar 17, 2010 2:09 PM in response to Ross_CCTA

Alright, the problem isn't solved...

I bound three Macs to the directory before installing the 10.6.2 combined update. All log in successfully in seconds, pre and post 10.6.2.

However, I bound a fourth Mac to the directory only after the 10.6.2 update. That Mac now takes about 45 seconds to log in. So it's very clearly a 10.6.2 issue (ironically, before I wiped the server clean, the Mac that is now experiencing long log in times was the only Mac that wasn't having the problem).

At this point I've unbound the fourth Mac and will leave it off OD until Apple releases an update solving the issue. Very frustrating problem...

Jun 2, 2010 8:04 AM in response to Diska

I fixed my problems with kinit. I doubt that my solution will apply to the others in this thread, but I'll just jot it down for reference:
My MacOS machine has been joined to an Active Directory which has a domainname ending in .local . It turns out that kinit is trying to look up the SRV record for kerberos-master.udp.REALM, this is an entry that AD doesnt create by itself and the result was that the local name resolution mechanism tried looking it up through mDNS.
I have no idea why it is falling back to mDNS as I should have disabled all .local lookups through mDNS after creating a top-level .local domain (see http://support.apple.com/kb/HT3473 )

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

kinit takes about 12 seconds to authorize a user

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