There are a number of different ways to join Linux systems into an Active Directory domain. One is to use winbind, a popular part of Samba often used for this purpose. However, having had success with the Likewise Open directory services plug-in for Mac I decided to give their Linux solution a shot as well. After all, it is free (as in beer). And I am glad I did (well, I wasn’t when I was using Ubuntu Server 10.10, but backing back down to 10.04 (which is LTS after all) made it all better.
To get started, let’s run apt-get to grab and install the likewise-open package:
apt-get -y install likewise-open
During the installation of the package, you’ll be asked for the realm name that you will eventually be joining to. Use your Active Directory domain name for most environments when prompted. Once installed, it couldn’t be easier to bind, just use the domainjoin-cli command that came with the package and tell it to ‘join’, followed by the domain name and then the user name. For example, if I was using a user called cedge to join to a domain called krypted.com, my command might look like this:
domainjoin-cli join krypted.com cedge
And then you’ll want to restart the host, or re-run the likewise-open startup:
update-rc.d likewise-open defaults
And viola, you now have an Ubuntu box bound to AD.