Good day. Over the last few days I have gone through every guide I could find for joining Ubuntu 18.04 to a windows domain. I have what I think is a working guide after much trial and error. Would appreciate if others could verify. So far I have had 100% success and a colleague has also had success.

Potential improvements may involve home directory settings.

apt -y install realmd sssd sssd-tools libnss-sss libpam-sss adcli samba-common-bin oddjob oddjob-mkhomedir packagekit

vim /etc/netplan/01-netcfg.yaml

#Indentation is IMPORTANT

Static IP

    version: 2
    renderer: networkd
            eth0: #Change this to the active adapter
                    addresses: [] # Static IP and cidr for THIS server
                    gateway4: # Gateway
                            search: [contoso.com, contoso]
                            addresses: []  # DNS IP


    version: 2
    renderer: networkd
            eth0: #Change this to the active adapter
                    dhcp4: true

netplan apply
netplan try
realm discover contoso.com
realm join -U %AD Admin Account% CONTOSO.COM

#More specific join command

realm join -U %AD Admin Account% --computer-ou %OU Path%

Move object to correct OU if not using specified method. If object already exists it will not work. For my large AD environment it took a while for it to show in my DC since I did not specify the DC.

vim /etc/sssd/sssd.conf

use_fully_qualified_names = False #Change True to False if you want.

systemctl restart sssd

su - admin

#Example - If your AD name and local Sudo account are the same a conflict can occur. You will need to do:

su - domain//%username%

id admin


Netplan: https://netplan.io/examples

  • Welcome, please take the tour to see how this site works. You are encouraged to ask a question and answer it yourself. – guntbert Dec 29 '19 at 20:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.