What are the best-practices for using Active Directory to authenticate users on linux (Debian) boxes?
The way I would like it to work would be to add AD users to a group - say linux administrators or linux webserver, and based on their group membership they would/would not be granted access to a particular server. Ideally the root account would be the only one maintained in the standard way.
My goals in doing this are as follows:
- To allow password changes in one place
- To automatically grant certain people access to the linux servers using their AD credentials
- To consolodate all of our user information into one database
Things I want to avoid are:
- anything difficult/counter-intuitive for our Active Directory administrator to manage
- locking users out if the AD servers are unreachable for some reason (ie - it needs to cache the credentials somehow)
- anything too complex or non-standard that will break the next time I upgrade the server.
Also see Linux clients on a Windows domains and How practical is it to authenticate a Linux server against AD?
There is no reason for you to use any external software on most distributions.
For Debian/Ubuntu you can do it with libnss-ldap and libpam-krb5. There are a few tricks to get it 100%. This assumes you have "unixHomeDirectory" populated for Linux users, your Linux boxes are using NTP common with your Windows systems (required by Kerberos) and that you are OK with plain text NSS lookups (not password but group membership info etc - you can also use TLS but that's more complicated to set up). You should NOT have pam_ldap as a password or auth source in PAM unless you are set up to use TLS.
/etc/ldap.conf
You should not need to edit /etc/krb5.conf assuming your Linux boxes are using DNS servers that know about AD (_msdcs zones with the appropriate SRV records are resolvable)
/etc/nsswitch.conf should have "files ldap" for users, groups, shadow.
For Red Hat using SSSD:
/etc/sssd/sssd.conf
The software you are looking for is called Likewise-open.
From their page:
We've used it on some machines here and it seems to work well.
http://www.likewise.com/products/likewise_open/
I've used Likewise-Open, and found it to be buggy and not very reliable. Last year I switched to Centrify, both for Linux and for the Mac, and haven't had to mess with it much at all. I far prefer Centrify's conf file configuration to Likewise-Open's registry file configuration that requires manipulation with external tools.
http://www.centrify.com/express/free-active-directory-tools-for-linux-mac.asp
You should evaluate Radius. Configure the linux boxes to use pam-radius and install the MS radius plugin NPS. It will talk to AD. You can get an overview in the pdf eguide here: http://www.wikidsystems.com/learn-more/two-factor-authentication-white-papers (no reg). Just ignore the two-factor authentication bits.