
Join RHEL to Active Directory with realmd and SSSD
For direct Active Directory integration on supported RHEL 8/9 installations. Legacy RHEL 7 and CentOS screenshots/configurations need release-specific review.
A successful domain join depends on DNS, time synchronization and a consistent identity mapping strategy. realmd discovers the domain and configures SSSD; start with that generated configuration instead of replacing Kerberos and PAM files with a generic template.
Check DNS, time and the computer identity
Use the organization-approved AD-capable DNS resolvers and a stable, unique hostname. Verify the required domain-controller records, firewall paths and time source. A delegated account allowed to create or reuse the computer object is sufficient; full Domain Admin membership is not a general prerequisite.
hostnamectl
getent hosts dc01.example.com
chronyc tracking
chronyc sources -v
timedatectl
Replace example.com and dc01.example.com with your own approved values. Manage resolver settings through the host network-management system rather than assuming /etc/resolv.conf is a permanently editable file.
Install the integration packages and discover the realm
sudo dnf install realmd sssd oddjob oddjob-mkhomedir adcli samba-common-tools krb5-workstation
sudo systemctl enable --now chronyd
realm discover example.com
sudo realm join --user=join-account example.com
realm list
Supply the delegated account password interactively. Discovery output should identify the expected AD domain and SSSD client software. If the join fails, inspect its error and system logs before changing cryptographic policy. Do not enable RC4, weaken the system crypto policy or disable reverse DNS as a blanket workaround.
Review identity mapping and access policy
Decide whether identities use SSSD SID-based mapping or centrally managed POSIX uidNumber/gidNumber attributes. Changing that choice after data has been written can change numeric ownership. Keep it consistent across Linux clients. The generated SSSD configuration normally belongs to root and requires restrictive permissions; back it up before editing and use sssctl config-check afterwards.
sudo sssctl config-check
authselect current
authselect check
id '[email protected]'
getent passwd '[email protected]'
sudo sssctl user-checks '[email protected]' -s sshd
Identity lookup succeeding does not prove that SSH/PAM/GPO access is allowed. Review the AD access provider and applicable policies. ad_gpo_access_control = permissive evaluates policies without enforcing them, so it is a diagnostic choice rather than a secure default. Offline credential caching also requires a prior successful online authentication and does not guarantee every offline login.
Configure home directories and privileged access deliberately
If automatic home-directory creation is required, enable the appropriate authselect feature while retaining the current profile and features, and ensure oddjobd is running. Grant sudo through a narrowly scoped group or command policy, validate changes with visudo, and avoid blanket passwordless administrative access.
Check dynamic DNS registration against the AD DNS policy and SSSD configuration; a Samba net ads dns register command is not a prerequisite for every SSSD join. DNS ownership, credentials and update permissions must match the intended registration method.
Validate a real login and document recovery
Keep a working local administrator and console session while testing a new domain login. Confirm group membership, home-directory ownership, sudo policy and service access. If rollback is required, use the documented realm leave process and restore only reviewed configuration backups. For low-numbered directory identities, see diagnosing low-UID login failures.
References
- Red Hat: connecting directly to AD using SSSD
- Red Hat: authselect and custom profiles
- SSSD project documentation