5

I have a problem with setting up auth for users on Linux (Fedora Core 15 to be exact) using Active Directory on Windows 2008 Server with installed support for UNIX systems. I've successfully setup Kerberos, tested using kinit -p <login> and klist to see ticket. But I still cannot login.

To reduce useless answers for me: no Samba, Winbind, Likewise or other software allowed. Only NIS/LDAP allowed.

Clarification: I want to setup client machine with both local and SSH access.

Update: I configured AD access through LDAP, getent passwd 106289gm and getent shadow give valid reponses, but getent group doesn't show any AD groups.

6
  • To be clear, are you asking how to set up Kerberos so that AD users can log in to linux via something like SSH?
    – sysadmin1138
    Jun 11, 2011 at 21:09
  • Does nsswitch.conf contain ldap in the group line?
    – HampusLi
    Jun 12, 2011 at 12:27
  • Yes it does have it.
    – Migol
    Jun 12, 2011 at 15:58
  • I haven't seen a lot of updates about your config, just the bounty update (I knew this looked familiar). A fairly extensive guide fpr Gentoo is here. I picked it because of its detail. Care to enlighten us on your current setup config files and if you diverged far from this process?
    – songei2f
    Jun 14, 2011 at 18:48
  • Oh, let us know about your /etc/libnss-ldap.conf in particular.
    – songei2f
    Jun 14, 2011 at 18:49

4 Answers 4

2

If you want "the easy way" I had some good experiences with system-config-authentication and Winbind doing it the GUI way. Obviously, this is not expressly Kerberos, so downvote me appropriately if you feel inclined. You can do Winbind, but it also expressly allows LDAP if that fits your requirements better. I get an ominous red error about NSS-LDAP libraries,

The /lib64/libnss_ldap.so.2 file was not found, but it is required for LDAP support to work properly. Install the nss-pam-ldapd package, which provides this file.

but I am sure you can install that with yum with a minimal amount of effort. You say you want Kerberos, but than say only NIS/LDAP is allowed. So why not just access AD as if it were LDAP. That is definitely possible in my experience. It also gives you the option of configuring Kerberos. See the screenshot.Sample screenshot of the GUI utility I am talking about

Hint, hint, it is Fedora 15, not Fedora Core, and has not been "Core" for quite a while. I will not make jokes about the bloat in relation to the name change (as a pretty dedicated Fedora user myself).

2
  • this method doesn't work as it doesn't have bindings.
    – Migol
    Jun 12, 2011 at 15:59
  • Woops, my bad. Sorry I couldn't be of more help.
    – songei2f
    Jun 12, 2011 at 16:33
1

It's one thing to be authenticated by kerberos, it's another thing to be able to login. To login, you need:

  1. Valid authentication (partially done: provided by kerberos. Must check if pam login/auth considers this to be enough)
  2. Valid userid and groupid (normally provided by winbind, likewise, ldap, Centrify, AD services for unix. Or locally in the /etc/passwd, /etc/group files)
  3. Valid lookup entries and order in /etc/nsswitch.conf, for user, and group.
  4. Valid shell and home (normally pre-created, or automount)

Note1: Since you can do getent passwd but not getent group, I suspect you are using the Active-Directory Services for Unix map to LDAP approach. Do you have valid gid set inside for Domain\Domainusers? AFAIK, Kerberos does not provide (or check) for groups. Able to see uid entries means LDAP is mapping properly, but gid entries may not be in LDAP.

Note2: There is also a limit to the number of entires LDAP can return in a single query, and possibly some time needed to pull the results. Did you wait long enough? Can you check the entries specifically, like getent passwd user1, getent passwd Domain\\user1, getent group domain-groupname-shown-in-getent-passwd. This should bypass the lookup time, or even timeout.

0

Which version of AD are you using? Depending on the version, extensions to the standard schema need to be installed or enabled. Users authenticating to linux systems will need additional parameters set in AD.

Also, it's hard to give help without seeing your config files and without knowing what specific error message you're seeing in the auth logs. If you're able to successfully get a ticket, that probably means your kerberos settings are correct. But, pam, nsswitch, and ldap must all be configured correctly as well.

tcpdump can be very helpful in these situations as well. Sometimes the error messages are not very helpful and it can be very useful to observe the conversation on the wire directly.

0

Have you enabled Kerberos login within PAM?

Look in /etc/pam.d/system-auth for a line that says "auth sufficient pam_krb5.so" (or something along those lines). If you don't see it, run authconfig --enablekrb5 --update, make sure a line like that appears in the file, and then try to log in again.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .