As I mentioned in the previous post, “Join Ubuntu to Active Directory with Samba“, SSSD can be used as a quick solution to joining AD on Ubuntu. This is how I’ve done it.
apt update
apt upgrade
apt install vim sssd-ad sssd-tools realmd adcli sssd-tools sssd libnss-sss libpam-sss adcli
realm -v discover xx.example.org
realm join -U administrator -i / xx.example.org
pam-auth-update --enable mkhomedir
sed -ri 's/(use_fully_qualified_names = )True/\1False/g' /etc/sssd/sssd.conf
sed -ri 's/(ldap_id_mapping = )True/\1False/g' /etc/sssd/sssd.conf
echo '%Domain\ Admins ALL=(ALL) ALL' >>/etc/sudoers
systemctl enable sssd
reboot