Joining an Active Directory domain with Ubuntu

What a pain. Imagine you are in Windows network environment and have a small amount of Ubuntu desktops. You task is to let them join the Active Directory so users can login with their known credentials. There is a package in universe called “authtool” even providing and promising to do what you need. Sadfully it is quite broken in it’s current status and if you ask me one should even consider removing it until it does at least not break you boot (don’t ask for details) and has a good set of working dependencies. There are other methods as ldap-binding but in my eyes there are either not stable or just too complicated to configure (and therefore hardly qualified for convincing people).

But a solution approaches if you read the following Ubuntu blueprint “Single User Interface to Join and Participate in Microsoft Active Directory Domains“. Currently you might not find much more information about it. So I dropped a line to the blueprint creator Gerald ‘Jerry’ Carter who was so kind of updating me with the current status of the project (and happens to be directly involved in Likewise):

It is planned to package the open source version of Likewise called “Likewise Open” for Ubuntu Hardy. Likewise Open enables you to join an Active Directory with actually some simple clicks or one console command. There is already an updated source tarball which can be installed quite easily:

$ wget \http://archives.likewisesoftware.com/\
likewise-open/src/likewise-open-4.0.4.tar.gz
$ tar zxf likewise-open-4.0.4.tar.gz
$ cd likewise-open-4.0.4-release
$ make dpkg

If you have all necessary dependencies resolved the make process should provide you with .deb files which you should install. As Jerry states there is currently one blocker which can be worked by not using the gui but calling a line like this

$ sudo domainjoin-cli join AD_REALM ADMIN_ACCOUNT

Afterwards you should be able to login like this “realm\username”. I tried the process on Gutsy and it worked quite well. I had to reboot once as my gdm hang – maybe it’s better to call the command directly from a “real” console. So what is missing? Check the comparison of Likewise Open and Likewise Enterprise, the commercial version of Likewise. The thing you might miss at first is:

Do more during logon: Create a home directory, copy template files, set permissions, run scripts, deliver messages, and more.

This means that Likewise Open enables you to login as AD user, creates his home under /local/AD_REALM/USER but you have be smart and hack around a bit to get things working like managing sudo, running scripts and so on. But nonetheless Likewise Open seems to be a promising approach for solving the problem of Ubuntu-Windows-network integration and I am sure to see some nice addons from the community in the future.

Please note: Installing software that changes login procedures is a deep intervention into Linux core procedures. So please: Do this with a test environment before considering it for production purposes.

This entry was posted in ActiveDirectory, Debian, Linux, Network, Security, Ubuntu, Windows. Bookmark the permalink.

13 Responses to Joining an Active Directory domain with Ubuntu

  1. Kevin Mark says:

    Hi Caspar,
    would the package be DFSG free, for inclusion in main, contrib or non-free? What about Ubuntu? Is it packaged for Debian? If not, might it good to send an RFP or ITP?
    cheers

  2. ccm says:

    Hi Kevin,

    Jerry told me, that the packages will be placed in Ubuntu Hardy (universe I guess) and will show up there within the next days. As the packaging procedure is really well prepared I think it’ll also go to Debian. So maybe let’s wait a couple of days and – until then – test a self compiled version

  3. Rick Clark says:

    It has been uploaded to universe and is sitting in the queue waiting for an Archive admin to look at it.

    In the meantime, you can install a slightly older version from my PPA.

    https://launchpad.net/~dendrobates/+archive

  4. Corey Burger says:

    The reason you need to restart to get GDM to pick up the changes is because of the wierd way GDM uses PAM. It doesn’t seem to pick up any config changes after boot.

  5. meh says:

    meh, i tried to build on debian etch and got errors after running make dpkg (as root) :(

  6. ccm says:

    @meh: Well “got errors” is not as much information as you should provide if expecting qualified response :)

  7. Andrea says:

    deb packages now created for gutsy and seem to work. I just downloaded and installed the package from the following location:

    http://archives.likewisesoftware.com/likewise-open/packages/Ubuntu/gutsy/

  8. angelblade says:

    Hi

    i know the command but i need if its possible join a domain with a name ou with spaces example

    domainjoin-cli join -ou departament/computers/My Pc mydomain the_admin_acc

    I have a ou with a name with spaces

  9. Brad Klein says:

    I got an error after make dpkg also. I’m using your latest build.

    msd@msd-desktop:~/Desktop/likewise-open-5.0.3991.1$ make dpkg
    sh packaging/scripts/build-dist
    /bin/rm: cannot remove directory `packaging/scripts/../../../likewise-open-5.0.3991.1′: No such file or directory
    make: *** [dist] Error 1
    msd@msd-desktop:~/Desktop/likewise-open-5.0.3991.1$

  10. ccm says:

    @Brad: I have not used this for about a year now. Please report back to the likewise developers directly.

    Best,

    ccm.

  11. Yogesh Naik says:

    I am able to join my ubuntu pc to windows AD server even i am able to login to AD server but after restarting i am not able login again to AD server any solution for above issue

  12. Devendra Chauhan says:

    Plz Anybody tell me how to join window domain from Ubuntu
    Plz Tell me step by step

  13. Devendra Chauhan says:

    Plz Anybody tell me how to join window domain from Ubuntu
    Plz send step by step process on my email id plz
    my
    email id:— dvchhn@yahoo.com

Leave a Reply

Your email address will not be published. Required fields are marked *

*

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