We utilise both Windows and Linux server at our software development company.
One of the friction points with this setup is that we don't have a single sign-on solution. Being more of a Microsoft shop than a Linux one we want to authenticate against AD.
I read a couple of articles online and I understand this to be possible.
We are currently using the following services on Linux that requires authentication:
- git server (through SSH)
- Sendmail
- Apache web server currently using .htaccess files.
- SAMBA file shares
What I want to know is how practical is this sort of setup? Does it really work or is it error-prone?
Its not hard and it's perfectly practical.
We have a few hundred dual boot desktop machines that use AD auth as well as a number of servers which use AD auth to enable windows clients to use their samba shares without explicit auth by the users.
There was another article on SF about what you need to do.
Basically you need to config kerberos, winbind, nss and pam.
Then you do a
kinit
and anet ads join
and your up.You can configure pam to use multiple methods for auth if you want, so if one does not work it will fall back to the next.
We usually use files, winbindd and ldap for servers serving fileshares to windows servers.
If possible I'd use LDAP for account info and windbind strictly for auth, but I believe you can map attributes in I think /etc/ldap.conf if you need to. If you do end up using winbindd for account info it is possible to use the RID (hashing method) to generate uids/gids, but it is also possible to use other methods. We used RIDs on one large fileserver and it has been a real pain, so I'd try and explore one of the other options if possible. In our case all AD users and groups are reflected in LDAP by an upstream IDM system, so we use LDAP for account info on newer servers and use winbind purely for auth.
Authenticating is absolutely simple using Likewise Open. http://www.likewise.com/products/likewise_open/index.php
Nearly my entire Linux infrastructure has centralized authentication and user management thanks to Likewise Open. It's stunningly simple to install and implement. I cannot possibly say enough good about it.
As a note, UIDs and GIDs are assigned according to a hash function, so they are identical across the entire infrastructure, so NFS mounts work perfectly.
I installed Windows Services for Unix and added a user in AD called "Unix Authenticator", then made the following config file changes on the linux machines:
/etc/ldap.conf: /etc/ldap.secret: /etc/nsswitch.conf: /etc/nsswitch.ldap: /etc/pam.d/system-auth:Hope this helps.
Got Windows users auth'ing against AD, but most of our servers (public drive etc.) are linux, and they're part of the domain. From a windows PoV no-one notices. From my side, it feels a bit fruity ssh'ing with my windows username but thats about the size of it.
Just usin plain old samba.
You don't need to use Samba, AD supports Kerberos and LDAP directly. 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