11 January 2026
RHEL 7/8: Join Active Directory with realm and sssd
Quick one-liner: Join RHEL to Active Directory in four commands — install realmd and sssd, configure auth, join the domain, and set home directory format.
🤔 Why This Matters
When you manage Linux servers in an enterprise, you don't want local accounts on every box. Active Directory gives you centralized authentication — one password, one account, access to everything.
On RHEL 7 and 8, joining AD is straightforward thanks to realmd and sssd. No editing PAM configs by hand, no guessing which packages to install.
🔧 Step 1: Install Required Packages
On a minimal server setup:
sudo yum install realmd sssd samba-common-tools oddjob-mkhomedir
The oddjob-mkhomedir package auto-creates home directories on first login — otherwise AD users can authenticate but get a "no home directory" error.
🔧 Step 2: Enable sssd
sudo authconfig --enablesssd --update
This configures PAM and NSS to use sssd for authentication and user lookups.
🔧 Step 3: Join the Domain
sudo realm join fosstech.biz
You'll be prompted for the AD administrator password. Once authenticated, your system joins the domain.
Verify the join:
realm list
You should see your domain listed with the configured server and client software.
🔧 Step 4: Configure Home Directory Format (Optional)
By default, sssd creates home directories as /home/username. I prefer /home/username@domain so it's clear which domain the user belongs to.
Edit /etc/sssd/sssd.conf:
[domain/fosstech.biz]
fallback_homedir = /home/%u@%d
Where %u is the username and %d is the domain name.
Restart sssd:
sudo systemctl restart sssd
✅ Test the Connection
id [email protected]
You should see the user's UID, GID, and group memberships from Active Directory.
✅ Quick Reference
| Command | What It Does |
|---|---|
yum install realmd sssd samba-common-tools oddjob-mkhomedir |
Install AD join packages |
authconfig --enablesssd --update |
Enable sssd for authentication |
realm join fosstech.biz |
Join the Active Directory domain |
realm list |
Verify domain membership |
id user@domain |
Test AD user lookup |
systemctl restart sssd |
Apply sssd config changes |