How to use realmd in Ubuntu 14.04 LTS to join an Active Directory domain?

Solution 1:

I have outlined all the steps necessary to get this up and working. There are a series of bugs regarding the install of the packages. All of the underlying software works great, but there are a few steps you have to take to make things work: http://funwithlinux.net/2014/04/join-ubuntu-14-04-to-active-directory-domain-using-realmd

Short version:

  1. Add the following to /etc/realmd.conf

    [service]
    automatic-install = no

  2. Next, install the following packages: samba-common-bin, samba-libs, sssd-tools, krb5-user, adcli

  3. Get a kerberos ticket for your AD user.

  4. Join in unattended mode with new user principal (on a single line):

realm --verbose join localdomain.xx --user-principal=myubuntuserver/[email protected] --unattended

  1. The error you mentioned is specifically related to a known bug (at least it's known to Fedora/RH at this time) in sssd. sssd segfaults on the option use_fully_qualified_names = True so go ahead and comment out that option and restart sssd.

Solution 2:

I tried the accepted answer on 16.04.1 LTS and the command failed with someting about the password. Running sudo realm join normally would give the error Necessary packages are not installed: sssd-tools sssd libnss-sss libpam-sss adcli, even though they are all installed. After searching for an hour I found this workaround, which says you should add --install=/ to the join command. So the full syntax is:

sudo realm join -v -U administrator DOMAIN.COM --install=/