The Identity Stack, Episode 8
EP07: LDAP HA → EP08 → EP09: Active Directory → …
Focus Keyphrase: FreeIPA setup
Search Intent: Investigational
Meta Description: FreeIPA integrates 389-DS, MIT Kerberos, Dogtag PKI, and SSSD into one Linux identity stack. Here’s what it gives you and how to use it effectively. (153 chars)
TL;DR
- FreeIPA is 389-DS (LDAP) + MIT Kerberos + Dogtag PKI + Bind DNS + SSSD — one
ipa-server-installcommand gets you an enterprise identity platform - Host-Based Access Control (HBAC) lets you define centrally: which users can SSH to which hosts — no more managing
/etc/security/access.confper machine - Sudo rules from the directory: define
sudopolicy centrally, have every machine pull it — no/etc/sudoers.d/files scattered across the fleet ipaCLI is the management interface —ipa user-add,ipa group-add,ipa hbacrule-add— everything that took five LDAP commands takes oneipacommand- FreeIPA trusts with Active Directory let Linux machines authenticate AD users without joining the AD domain
- The right choice for Linux-centric environments; AD is the right choice when Windows clients dominate
The Big Picture: What FreeIPA Integrates
┌─────────────────────────────────────────────────────────┐
│ FreeIPA Server │
│ │
│ 389-DS (LDAP) MIT Kerberos Dogtag PKI │
│ ───────────── ─────────── ───────── │
│ User/group TGT + service Machine certs │
│ storage ticket issuing User certs │
│ OCSP / CRL │
│ Bind DNS SSSD (client) Apache (WebUI) │
│ ────────── ──────────── ────────────── │
│ SRV records Enrollment Management UI │
│ for KDC/LDAP automation REST API │
└─────────────────────────────────────────────────────────┘
▲ ▲
│ enrollment │ SSH + sudo rules
┌──────────┴──────────┐ ┌───┴──────────────────┐
│ Linux client │ │ Linux client │
│ (ipa-client-install)│ │ (ipa-client-install) │
└─────────────────────┘ └──────────────────────┘
EP06 and EP07 built OpenLDAP from components. FreeIPA gives you all of that plus Kerberos, PKI, DNS, and HBAC — opinionated, integrated, and managed through a single CLI and WebUI. This episode shows what you actually get from it.
Why FreeIPA Instead of Bare OpenLDAP
Running bare OpenLDAP requires you to:
– Configure schema for POSIX accounts, SSH keys, sudo rules, HBAC manually
– Set up MIT Kerberos separately and integrate it with LDAP
– Build your own PKI for machine certificates
– Maintain DNS SRV records for Kerberos discovery
– Write client enrollment scripts
– Build a management interface (or live in LDIF)
FreeIPA does all of this in one installer, with a consistent data model across all components. The trade-off is opacity — FreeIPA makes decisions for you (schema, replication topology, Kerberos realm name) that bare OpenLDAP leaves to you.
Installing FreeIPA Server
# RHEL / Rocky / AlmaLinux
dnf install -y freeipa-server freeipa-server-dns
# Run the installer (interactive)
ipa-server-install
# Or non-interactive:
ipa-server-install \
--realm=CORP.COM \
--domain=corp.com \
--ds-password=DM_password \
--admin-password=Admin_password \
--setup-dns \
--forwarder=8.8.8.8 \
--unattended
# After install: get an admin Kerberos ticket
kinit admin
The installer creates:
– 389-DS instance with the FreeIPA schema
– MIT KDC with realm CORP.COM
– Dogtag CA and all certificate infrastructure
– Bind DNS with SRV records for the KDC and LDAP server
– Apache WebUI at https://ipa.corp.com/ipa/ui/
– SSSD configured on the server itself
Time: 5–10 minutes. What used to take a week of manual configuration.
The ipa CLI
Every management action goes through ipa. It talks to the IPA server’s REST API and handles Kerberos authentication transparently (it uses your kinit session).
# Users
ipa user-add vamshi \
--first=Vamshi --last=Krishna \
[email protected] \
--password
ipa user-show vamshi
ipa user-find --all # search all users
ipa user-disable vamshi # lock account without deleting
ipa user-mod vamshi --shell=/bin/zsh
# Groups
ipa group-add engineers --desc "Engineering team"
ipa group-add-member engineers --users=vamshi,alice
# Password policy
ipa pwpolicy-mod --minlength=12 --maxlife=90 --history=10
# SSH public keys — stored centrally, pushed to every host
ipa user-mod vamshi --sshpubkey="ssh-ed25519 AAAA..."
# SSSD on enrolled hosts will use this key for SSH login — no authorized_keys file needed
Host-Based Access Control (HBAC)
HBAC is the feature that justifies FreeIPA for most Linux shops. It lets you define centrally: which users (or groups) can log in to which hosts (or host groups), using which services (SSH, sudo, FTP).
Without HBAC, access control is per-machine: /etc/security/access.conf or PAM pam_access rules, replicated across every server, managed inconsistently.
With HBAC: one rule, enforced everywhere.
# Create host groups
ipa hostgroup-add production-servers --desc "Production Linux hosts"
ipa hostgroup-add-member production-servers --hosts=web01.corp.com,db01.corp.com
# Create user groups
ipa group-add sre-team
ipa group-add-member sre-team --users=vamshi,alice
# Create an HBAC rule
ipa hbacrule-add allow-sre-to-prod \
--desc "SRE team can SSH to production"
ipa hbacrule-add-user allow-sre-to-prod --groups=sre-team
ipa hbacrule-add-host allow-sre-to-prod --hostgroups=production-servers
ipa hbacrule-add-service allow-sre-to-prod --hbacsvcs=sshd
# Test the rule before applying
ipa hbactest \
--user=vamshi \
--host=web01.corp.com \
--service=sshd
# Access granted: True
# Matched rules: allow-sre-to-prod
SSSD on each enrolled host enforces the HBAC rules at login time by querying the IPA server. No per-machine configuration. Add a new server to the production-servers host group and the HBAC rules apply immediately.
Sudo Rules from the Directory
# Create a sudo rule
ipa sudorule-add allow-sre-sudo \
--cmdcat=all \
--desc "SRE team gets full sudo on production"
ipa sudorule-add-user allow-sre-sudo --groups=sre-team
ipa sudorule-add-host allow-sre-sudo --hostgroups=production-servers
# Or a scoped rule — only specific commands
ipa sudorule-add allow-service-restart
ipa sudocmdgroup-add service-commands
ipa sudocmd-add /usr/bin/systemctl
ipa sudocmdgroup-add-member service-commands --sudocmds="/usr/bin/systemctl"
ipa sudorule-add-allow-command allow-service-restart --sudocmdgroups=service-commands
On enrolled hosts, SSSD’s sssd_sudo responder pulls these rules and the sudo command evaluates them locally. No /etc/sudoers.d/ files. Central policy, local enforcement.
Enrolling a Client
# On the client machine
dnf install -y freeipa-client
ipa-client-install \
--domain=corp.com \
--server=ipa.corp.com \
--realm=CORP.COM \
--principal=admin \
--password=Admin_password \
--unattended
# What this does:
# 1. Registers the host in IPA as a machine principal
# 2. Retrieves a host Kerberos keytab (/etc/krb5.keytab)
# 3. Configures SSSD (sssd.conf, nsswitch.conf, pam.d)
# 4. Configures Kerberos (/etc/krb5.conf)
# 5. Optionally configures NTP and DNS
After enrollment: getent passwd vamshi returns the IPA user. SSH with an IPA password works. HBAC rules are enforced. Sudo rules from the directory apply. SSH public keys from the user’s IPA profile work without authorized_keys files.
FreeIPA Trust with Active Directory
In mixed environments (Linux servers + Windows clients), you can establish a trust between FreeIPA and AD without joining the Linux servers to the AD domain directly.
# On the IPA server (after installing ipa-server-trust-ad)
ipa-adtrust-install --netbios-name=CORP
# Establish the trust
ipa trust-add ad.corp.com \
--admin=Administrator \
--password \
--type=ad
# AD users can now log in to IPA-enrolled Linux hosts
# They appear as: CORP.COM\username or [email protected]
Under the hood: FreeIPA acts as an SSSD-enabled Samba DC for the trust relationship. AD users’ Kerberos tickets from the AD KDC are accepted by the FreeIPA KDC, which maps them to POSIX attributes stored in IPA (or automatically generated via ID mapping).
⚠ Common Misconceptions
“FreeIPA is just OpenLDAP with a UI.” FreeIPA uses 389-DS (not OpenLDAP), adds a full Kerberos KDC, a certificate authority, DNS, HBAC enforcement, and sudo management — all with a consistent schema designed for these use cases. It’s an integrated identity platform, not a wrapper.
“HBAC rules replace firewall rules.” HBAC controls who can log in to a host at the authentication layer — not network access. A blocked HBAC rule means the SSH session is rejected after TCP connection. You still need firewall rules to block TCP access.
“FreeIPA replicas are identical.” FreeIPA uses 389-DS Multi-Supplier replication. All replicas accept reads and writes. But the CA is separate — only the initial server (and explicitly designated CA replicas) run the CA. If the CA goes down, certificate operations stop; authentication does not.
Framework Alignment
| Domain | Relevance |
|---|---|
| CISSP Domain 5: Identity and Access Management | FreeIPA is an enterprise IAM platform — HBAC, sudo policy, SSH key management, and certificate-based authentication are all IAM controls |
| CISSP Domain 3: Security Architecture and Engineering | FreeIPA’s integrated CA enables certificate-based authentication for machines and users — a stronger authentication factor than passwords |
| CISSP Domain 1: Security and Risk Management | Centralized HBAC and sudo policy reduces the attack surface of privilege escalation — no more inconsistent sudoers files that drift across the fleet |
Key Takeaways
- FreeIPA = 389-DS + MIT Kerberos + Dogtag PKI + Bind DNS — one installer, one management interface
- HBAC rules define centrally who can SSH to which host groups — enforced by SSSD on every enrolled client, no per-machine config
- Sudo rules from the directory replace scattered
/etc/sudoers.d/files — central policy, SSSD-enforced locally ipa hbactestlets you verify access rules before a user hits a blocked login — use it before every policy change- For Linux-centric environments: FreeIPA. For Windows-dominant environments: AD. For mixed: FreeIPA trust with AD.
What’s Next
FreeIPA is the Linux answer to enterprise identity. EP09 covers the Microsoft answer — Active Directory — which extended LDAP and Kerberos into a complete enterprise platform with Group Policy, Sites, and a replication model built for global scale.
Next: How Active Directory Works: LDAP, Kerberos, and Group Policy Under the Hood
Get EP09 in your inbox when it publishes → linuxcent.com/subscribe