Configure system
If your domain does not support AES encryption for Kerberos, you have to enable support for RC4 encryption.
cat /etc/crypto-policies/state/current
update-crypto-policies --set DEFAULT:AD-SUPPORT-LEGACY
reboot
The policy is defined in /usr/share/crypto-policies/policies/modules/AD-SUPPORT-LEGACY.pmod.
Join Domain
With a one time password
- In AD, restore the password for the computer object. The password is the
samAccountNamein lowercase and without the dollar sign.- If the computer name is
LinuxServer123.domain.tldthe password islinuxserver123.
- If the computer name is
- Discover abailable domains with:
realm discover domain.tld - Join the domain with:
sudo realm join --one-time-password=linuxserver123 domain.tld
With a domain admin account
realm discover domain.tldsudo realm join -U BobTheAdmin domain.tld
Configure users in domain
Users need to have populated the fields uidNumber and gidNumber and the groups need to have the gidNumber.
Otherwise this error is given
To search for the currently used uid and gid numbers, use this commands:
Get-ADUser -Properties uidNumber,gidNumber -Filter "uidNumber -like '*' -or gidNumber -like '*'" | Select-Object name,uidNumber,gidNumber | Sort-Object -Property uidNumber
Get-ADGroup -Properties gidNumber -Filter "gidNumber -like '*'" | Select-Object name,gidNumber | Sort-Object -Property gidNumber
Debug from Linux
Get user
Get group
Clear local sss cache. Ex: when you remove a user from a group.