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
#Indentation is IMPORTANT
network: version: 2 renderer: networkd ethernets: eth0: #Change this to the active adapter addresses: [192.168.1.1/24] # Static IP and cidr for THIS server gateway4: 192.168.1.1 # Gateway nameservers: search: [contoso.com, contoso] addresses: [192.168.1.2] # DNS IP
network: version: 2 renderer: networkd ethernets: eth0: #Change this to the active adapter dhcp4: true
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.
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%