Linux authentication against Active Directory

Date August 7, 2008

If you’ve been reading the blog for a while, you might remember me saying that I have been (and perpetually am) fighting with centralized authentication. Well, I’m here to update you.

I have found the answer, at least for authentication against Active Directory. Salvation, thy name is Likewise Software

Likewise produces two pieces of software. The first is Likewise Open, a free piece of software that authenticates your Linux/Mac/AIX/etc machine against active directory. It does this by making several changes to the default configuration of things like PAM and Samba. The end result is that you can log into your linux machine with Windows’ Active Directory credentials. It’s very neat, it’s free, it’s incredibly easy to install AND uninstall. Best of all, it really really integrates with Active Directory in, as far as I can tell given what little I know of AD, the Right Way(tm). I submit for your approval:


(click to embiggen)

You can see there, all of the machines that I’ve installed this on show up in Active Directory. When I log into the machine, I can log in with domain credentials and it knows about my default group (as specified in AD Users and Computers):

<

bandman@newcastle[504]:~$ ssh int\\msimmons@a-fs1
Password:
Last login: Thu Aug  7 10:18:02 2008 from 10.1.1.24
[INT\msimmons@a-fs1 ~]$ ls -al
total 36
drwxr-xr-x 3 INT\msimmons INT\enterprise^admins 4096 Aug  7 10:18 .
drwxr-xr-x 3 root         root                  4096 Aug  5 21:17 ..
-rw------- 1 INT\msimmons INT\enterprise^admins  124 Aug  7 10:18 .bash_history
-rw-r--r-- 1 INT\msimmons INT\enterprise^admins   33 Aug  5 21:17 .bash_logout
-rw-r--r-- 1 INT\msimmons INT\enterprise^admins  176 Aug  5 21:17 .bash_profile
-rw-r--r-- 1 INT\msimmons INT\enterprise^admins  124 Aug  5 21:17 .bashrc
-rw-r--r-- 1 INT\msimmons INT\enterprise^admins   32 Aug  5 21:17 .k5login
drwxr-xr-x 4 INT\msimmons INT\enterprise^admins 4096 Aug  5 21:17 .mozilla
-rw------- 1 INT\msimmons INT\enterprise^admins   58 Aug  7 10:18 .Xauthority

Let me tell you, I’m impressed.

Now, this is just Likewise Open, the free version. It only modifies the configuration on the Unix based machines. Also available is Likewise Enterprise, which provides the same service, but goes above and beyond Likewise Open, in that it actually makes changes to the AD structure. As far as I know, all of those changes are benign, in that they break nothing related to any other Windows service. I haven’t worked my way through the nearly 500 pages of documentation that I had printed and bound at Kinkos the other day.

I’m sure this post sounded like a commercial, but it’s not. I haven’t been paid (or even contacted, other than the initial autogen email) by Likewise software, I’m just a grateful user who is happy to share knowledge of a tool that works. Finally.



14 Responses to “Linux authentication against Active Directory”

  1. Dan C said:

    Have you looked at Samba and Winbind in your travels?

    We’ve been using it with success for a few years.

  2. Matt said:

    Dan,

    No, I’ve not. Do you happen to have a sample configuration laying around? I’d be interested in seeing how it works.

  3. Anonymous said:

    Umm, this is really easy with Samba and winbind – no need for any other product.
    See http://wiki.samba.org/index.php/Samba_&_Active_Directory

  4. Matt said:

    Like so many other things, it’s really easy once you know how to do it. Until then, it’s difficult.

    Thanks for the link. It looks like, among other things, Likewise Open does a version of what that wiki is talking about.

  5. Dale said:

    Thanks,

    I’ve done this the hard way enough times, I’m ready to have it happen automatically!

    Added to the toolkit.

    Dale

  6. Luis said:

    we are in the middle of a large ish implementation, and I can say first hand the likewise stuff is good, and they have some sharp guys hiding in the back room somewhere making this work. They even handled our very *ahem* unique network design well.

    the 4.x client uses bits of winbind, an works as well as winbind. The biggest pluses for us are:

    1- no meta directory.
    2- addresses our multiple nis domains across the globe, with mismatched accounts across them.
    3- single account!

    I’ll keep anyone who is interested posted as we get further into our deployment, but so far, pretty darn good stuff.

    -

  7. luis said:

    To anonymous—

    for single machines it is easy. when you have to match uids/gids across thousands of workstations and nodes, you need a proper directory service.

    if you don’t have windows, there is openldap, and plenty of open source tools to help you manage it.

    In the real world we have silos and mixed environments we have to make play nice with each other.

  8. Matt said:

    Luis,

    I would be really interested in learning more about the whole process.

    Instead of integrating the linux machines into a pre-existing directory, I’m building a directory and then including a dozen-ish linux servers to access it. The cart before the horse, in many people’s opinion.

    If you don’t want to put the information on the forum, you can get me at standalone.sysadmin@gmail.com

    Thanks, and thanks a lot for the comments!

  9. Luis said:

    hi Matt-

    I would be happy to work with you on the side and share our experiences. After sanitation of data, you can share it with the blog-o-sphere.

    -luis

  10. Anonymous said:

    Here’s a little trick.

    Add your Active Directory user to about 30 or so groups. Then try to log in to a Linux machine using Likewise Open (which is based on samba).

    Because of a bug (for which a patch was published in April), winbindd will start going into an endless cycle of start/die, making the machine useless.

    The response to this critical bug (which made it impossible to use at our site) has been less than stellar, with a fix still not published as of a week ago.

    This was a problem because it was something that only showed up in production, not in the small test installations we did. Something to check before widespread adoption…

  11. jongoogle said:

    Wow, interesting stuff. We are a research laboratory, and we started writing our own directory management software some years before Active Directory was announced.

    Our (GPL’ed) software is called Ganymede, and can be found at http://www.arlut.utexas.edu/gash2/. Ganymede solves the problem of intelligent management of the data at the head-end, but doesn’t do much for getting the data out to the clients.. we depend on Active Directory, NIS, DNS, MySQL, Radius, etc., to do that.

    In our environment, we don’t need Active Directory for anything but the Windows clients.. all of our non-Windows authentication is currently done by non-AD means, our DNS is done using BIND, etc., but Likewise’s stuff looks like it could really tie the room together.

    Nice especially to see that the Likewise guys are working with the Samba and OpenLDAP folks to get some of their interoperability stuff contributed.

  12. James said:

    I do this on Ubuntu with a set of directions that I standardized on and wrote up for my company.

    We don’t have any non-Windows desktops, all my Linux is for servers which are always online and hardwired to the network. If the Likewise product allows caching AD credentials, then it’s got my standard procedures beat.

  13. Stewart said:

    Interesting post,

    Thanks for sharing this useful information and i was looking for the same.

    SoftwareDirectory

  14. Anonymous said:

    Luis.. we are also researching a Likewise implementation. Can you provide any more feedback on your experience? Thanks!

Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Easy AdSense by Unreal

Switch to our mobile site