Red Hat Enterprise Linux ships with most of the controls needed to meet CIS, DISA STIG and PCI DSS baselines, but they are spread across tools that many teams never switch on. System-wide cryptographic policies, the SCAP Security Guide, fapolicyd, authselect, AIDE, USBGuard, Keylime and the audit sample rules each close a specific gap, and each has a safe and an unsafe way to roll out. This guide is the RHEL-specific layer on top of the distribution-neutral Linux Server Hardening Guide: it covers how identity and privilege work on RHEL 9 and 10, the machine identities RHEL hosts hold, the RHEL tooling for baselines and detection, and the misconfigurations that undo them. It is for Linux engineers, platform teams and auditors running RHEL fleets.
This is an independent guide from NHI Mgmt Group, based on Red Hat's public documentation as of November 2026. It is not sponsored or reviewed by Red Hat. Product features change, so confirm settings against Red Hat's current documentation.
Key takeaways
- Set the crypto policy once, system-wide.
update-crypto-policiescontrols TLS, SSH, IPsec, Kerberos and DNSSEC algorithms for every library at once; DEFAULT disallows SHA-1 signatures and needs 2048-bit RSA, FUTURE raises that to 3072-bit, and LEGACY should be a dated exception, not a fix. - Decide on FIPS at install time. Red Hat recommends starting the installation with
fips=1; switching later withfips-mode-setup --enabledoes not guarantee FIPS 140 compliance and FIPS mode cannot be cleanly disabled afterwards. - Use the shipped SCAP profiles, carefully.
scap-security-guideprovides CIS, STIG, PCI DSS, HIPAA, OSPP, ANSSI, E8 and other profiles; scan withoscap xccdf evalfirst, because--remediatecan break a system and has no automated revert. - Manage authentication with authselect, not by editing PAM. Generated
/etc/pam.dfiles say "Do not modify this file manually"; useauthselect select sssd with-faillockand join IdM or Active Directory for central identities. - Control what runs, not only who logs in. fapolicyd trusts the RPM database and blocks unknown binaries; start in
permissive = 1, review denials withausearch -m fanotify, then enforce.
How identity and access work in RHEL
A RHEL host resolves users through NSS and authenticates them through PAM, and authselect owns both. The choice of profile decides where identities come from.
| authselect profile | Identity source | When to use |
|---|---|---|
sssd (default) | SSSD in front of LDAP, Red Hat Identity Management (IdM) or Active Directory | Almost every fleet: central accounts, offline caching, host-based access control and sudo rules from the directory |
winbind | Direct Active Directory membership through Samba winbind | Hosts that also serve SMB shares to Windows clients |
minimal | Local files only | Appliances, bastions that must work without a directory, containers |
- Features: append features to the profile, for example
authselect select sssd with-faillock with-mkhomedir, and addwith-smartcardfor PIV or CAC login. Check the current state withauthselect currentand record it before any change, so it can be reverted. - Do not hand-edit: authselect regenerates
/etc/pam.d/system-authandpassword-auth, and/etc/nsswitch.confchanges belong in/etc/authselect/user-nsswitch.conffollowed byauthselect apply-changes. Hand edits are lost or, worse, silently kept on some hosts and not others. Red Hat also advises against changing profiles thatipa-client-installorrealm joinconfigured. - Directory joins:
ipa-client-installjoins IdM (FreeIPA) andrealm joinjoins Active Directory; both create a host keytab in/etc/krb5.keytabthat is the host's own identity. See the FreeIPA and Red Hat Identity Management Guide and the SSSD and Linux Active Directory Integration Guide. - Smart cards and polkit: RHEL documents PKCS #11 for SSH keys held on smart cards and polkit rules that control which users can use the card daemon, useful where administrators must use hardware-backed keys.
Admin roles and privileged access
RHEL has no built-in role model beyond root, groups, sudo, polkit and SELinux. Combining them well is what separates a hardened host from a default one.
- Root: disable direct root SSH login, keep the root password vaulted for console recovery, and use named accounts with sudo. The
wheelgroup is the conventional sudo group on RHEL; prefer narrow rules in/etc/sudoers.d/or IdM sudo rules over blanketALL. See the sudo and sudoers Security Guide. - Central policy: IdM host-based access control (HBAC) rules decide which user groups may log in to which host groups, and IdM sudo rules replace per-host sudoers files, so removing someone from a group removes access everywhere.
- Lockout:
with-faillockenablespam_faillock; settings live in/etc/security/faillock.conf. Confirm the values your benchmark requires (the STIG and CIS profiles set them) and exempt nothing but the break-glass path you have tested. - SELinux confined administrators: keep SELinux enforcing with the targeted policy. Where separation of duties matters, map Linux users to confined SELinux users such as
staff_uorsysadm_uso a sudo shell is still limited by policy. See the SELinux Guide. - Web console: the RHEL web console (Cockpit, TCP 9090) gives a full administrative shell in the browser; disable
cockpit.socketwhere it is not used, or restrict it to the admin network. - Local privilege escalation: unpatched setuid and polkit components can give root to a local user (ATT&CK T1068 Exploitation for Privilege Escalation), so apply Red Hat security updates promptly; patching of setuid and polkit components matters as much as account controls.
Integrations, API tokens and service accounts
A RHEL server carries several machine identities that are easy to forget because nobody logs in with them.
| Machine identity | Where it lives | Risk | Control |
|---|---|---|---|
| Host Kerberos keytab | /etc/krb5.keytab | Copying it lets an attacker impersonate the host to IdM or AD | Root-only permissions, rotate on rebuild, remove the host object at decommission. See the Linux Service Accounts and Keytab Management Guide |
| Subscription identity certificate | Created by subscription-manager register or rhc connect | Identifies the host to Red Hat services and Insights | Unregister at decommission so the inventory stays true |
| Activation keys | Hybrid Cloud Console; used with the organisation ID at registration | Anyone holding a key and org ID can register systems into your account | Keep keys out of public images and repos; limit who can create and edit them |
| Satellite or automation credentials | Ansible inventories, Satellite remote execution SSH keys | Push root commands to every host | Dedicated service accounts, keys in a vault, sudo limited to required commands. See the SSH Key Management Guide |
| Clevis and Tang bindings | LUKS header metadata | Disk unlocks automatically on the trusted network | Tang servers on a protected network, TPM 2.0 binding for laptops |
| Application service accounts | Local users or IdM service principals | Interactive shells and broad sudo | /sbin/nologin shells, systemd sandboxing, keytabs instead of passwords |
Record each of these in the service account inventory with an owner. The Service Account Security Guide covers the lifecycle; on RHEL the specific gaps are keytabs left behind on cloned images and registration keys baked into golden images.
Logging and detection
- auditd: put persistent rules in
/etc/audit/rules.d/and compile them withaugenrules --load. Red Hat ships sample rules in/usr/share/audit/sample-rules/(for example30-stig.rules,30-pci-dss-v31.rules,30-ospp-v42*.rules), but warns they are neither exhaustive nor current, so take the rules from the SCAP profile instead. Use99-finalize.rulesto make the rule set immutable until reboot. - auditd resilience: Red Hat's strict-environment guidance puts
/var/log/audit/on its own mount point, setsmax_log_file_action = keep_logs,space_left_actiontoemailorexec, anddisk_full_actiontohaltorsingle. Choose the halt options only where losing availability is better than losing audit records. - Remote logging: forward with rsyslog over TLS or RELP (both documented), or with the
loggingRHEL system role for consistency. See the Linux Logging and auditd for Defenders Guide. - Integrity: AIDE detects changed binaries and configuration files; Keylime adds remote measured-boot and runtime attestation using the TPM for hosts where kernel or boot tampering (T1014 Rootkit, T1547.006 Kernel Modules and Extensions) is in scope.
- Execution control signals: fapolicyd denials appear as fanotify audit events (
ausearch -ts recent -m fanotify); a denial on a production server is either a deployment that skipped the trust database or an intruder's tool. - Useful queries:
ausearch -m USER_LOGIN -ifor logins, plus alerts on changes to/etc/sudoers.d/,/etc/pam.d/(T1556.003 Pluggable Authentication Modules), new systemd units (T1543.002) and cron entries (T1053.003).
Hardening baseline
Cryptographic policy
| Policy | What it enforces | Use |
|---|---|---|
| DEFAULT | TLS 1.2 and 1.3, SSH2, IKEv2; RSA and DH minimum 2048-bit; SHA-1 signatures disallowed; CBC disabled for SSH | General servers |
| FUTURE | RSA and DH minimum 3072-bit; 128-bit ciphers disabled; SHA-1 disallowed in DNSSEC and HMAC; CBC disabled except Kerberos | Internal high-assurance systems; test for interoperability first |
| FIPS | FIPS 140 conformant algorithms; minimum 2048-bit; SHA-1 signatures disallowed | Regulated and government workloads, set at install |
| LEGACY | Compatibility with RHEL 6 and earlier; SHA-1 and SSH CBC allowed | Avoid; use a narrow subpolicy instead |
Subpolicies tune a base policy without dropping to LEGACY: DEFAULT:SHA1 re-enables SHA-1 signatures, LEGACY:AD-SUPPORT and related modules address Active Directory interoperability, FIPS:OSPP adds Common Criteria restrictions, and on RHEL 9.7 and later DEFAULT:PQ adds post-quantum algorithms. Custom modules go in /etc/crypto-policies/policies/modules/. Reboot after update-crypto-policies --set so running services pick up the change. See the TLS Server Configuration Baseline Guide.
Rollout sequence
- Install right: minimal package set, separate
/boot,/,/home,/tmpand/var/tmppartitions on bare metal, LUKS2 on data volumes, andfips=1on the kernel command line if FIPS is required. Deploying compliant systems is easiest at installation: the installer and RHEL image builder can apply a SCAP profile during the build. - Post-install:
dnf update, confirm firewalld is running and enabled, disable services you do not need (for examplesystemctl disable cups), and confirmgetenforcereturns Enforcing. - Pick a profile: choose one SCAP profile per system class, for example
xccdf_org.ssgproject.content_profile_cis_server_l1,_stig(or_stig_guifor Server with GUI, since the cis, cis_server_l1 and stig profiles are not compatible with that package set) or_pci-dss. CIS also publishes its own RHEL 8, 9 and 10 benchmarks and separate CIS RHEL STIG benchmarks. See the CIS Benchmarks Guide and the DISA STIG Guide. - Scan, do not remediate yet:
oscap xccdf eval --report report.html --profile <profileID> /usr/share/xml/scap/ssg/content/ssg-rhel9-ds.xml(use the matching data stream for RHEL 10). Review failures with the application owner and record accepted deviations. - Remediate through code: generate the Ansible playbook or Bash script for the profile and run it on a pilot ring, rather than
--remediatein place, because Red Hat warns remediation can make a system non-functional and offers no automated revert. Rollback is a snapshot or rebuild. - Execution control: install fapolicyd with
permissive = 1in/etc/fapolicyd/fapolicyd.conf, add application paths withfapolicyd-cli --file add <path> --trust-file <name>, checkfapolicyd-cli --check-configand--check-trustdb, then setpermissive = 0. Considerintegrity = sha256once the trust set is stable; the default isnone. - Devices and integrity: enable USBGuard on hosts with physical exposure, initialise AIDE and schedule checks, and bind LUKS volumes with Clevis to Tang or TPM 2.0 for unattended boot.
- Keep it there: rescan on a schedule, alert on drift and stay on a supported minor release. RHEL major releases have a ten-year life cycle of Full and Maintenance Support; the Extended Life Phase that follows receives no security fixes. See the OpenSCAP and Linux Compliance Scanning Guide.
Common misconfigurations
- LEGACY policy as a quick fix: one old client fails to connect, the whole host is set to LEGACY and SHA-1 and CBC come back for every service. Use a subpolicy or fix the client.
- FIPS switched on late: enabling FIPS on a running system after keys and certificates were generated leaves non-compliant keys in place; auditors then find the host does not meet FIPS 140 despite
fips-mode-setup --checkreporting it enabled. - Blind
--remediatein production: applying a full STIG profile in place locks out service accounts, changes SSH ciphers and breaks applications with no automated way back. - Hand-edited PAM: manual changes to
/etc/pam.dthat authselect later overwrites, or that differ between hosts, leaving lockout and MFA inconsistent. - SELinux set to permissive to make an application work: the most common way a RHEL host loses its strongest containment layer; write a local policy module instead.
- Untrusted repositories: enabling third-party or development repositories on production hosts. Stable, signed channels and measured adoption of new upstream releases are a real defence. See the Linux Package Signing and Repository Trust Guide.
Decision guidance and framework mapping
- CIS or STIG: CIS Level 1 server is a practical default for commercial fleets; the STIG profile is stricter and needed for US federal and defence work. Running both on one host causes conflicting settings; pick one and document deviations.
- Small teams: start with the crypto policy, authselect with faillock, SELinux enforcing, a CIS Level 1 scan and remote logging. Add fapolicyd for internet-facing and high-value hosts.
- Large fleets: build compliance into image builder blueprints and Kickstart, distribute rules from IdM (HBAC, sudo), use Satellite or Ansible for remediation, and track compliance scores centrally.
| RHEL control | NIST SP 800-53 Rev. 5 | NIST CSF 2.0 | CIS Controls v8.1 |
|---|---|---|---|
| SCAP profiles and drift scans | CM-2, CM-6, RA-5 | PR.PS-01, ID.RA-01 | 4, 7 |
| Crypto policies, FIPS, LUKS | SC-8, SC-13, SC-28 | PR.DS-01, PR.DS-02 | 3 |
| authselect, SSSD, IdM, faillock | IA-2, IA-5, AC-2 | PR.AA-01 | 5, 6 |
| sudo rules, HBAC, SELinux users | AC-6 | PR.AA-05 | 5, 6 |
| fapolicyd, USBGuard | CM-7, CM-11 | PR.PS-02 | 2 |
| auditd, rsyslog TLS, AIDE, Keylime | AU-2, AU-9, AU-12, SI-4, SI-7 | PR.PS-04, DE.CM-09 | 8 |
| Supported release and errata | SI-2 | ID.AM-08 | 7 |
Metrics: percentage of hosts passing their assigned SCAP profile above an agreed score; hosts on LEGACY policy or with SHA-1 re-enabled (target zero without an expiry-dated exception); hosts with SELinux not enforcing (target zero); hosts not on a supported minor release; fapolicyd denials per week on production servers, each investigated; and median days from Red Hat security advisory to installed errata for critical updates.
Practitioner checklist
- Set the crypto policy to DEFAULT or stricter on every host and track any subpolicy exceptions with an expiry.
- Decide FIPS before installation and install with
fips=1where required. - Assign one SCAP profile per system class, scan with
oscap xccdf evaland remediate through Ansible on a pilot ring. - Configure authentication only through authselect, with
with-faillock, and join IdM or AD for named accounts. - Replace per-host sudoers with IdM sudo and HBAC rules or narrow
/etc/sudoers.d/files; disable root SSH login. - Keep SELinux enforcing; fix denials with policy modules, not permissive mode.
- Inventory host keytabs, activation keys and automation SSH keys with owners; clean them up at decommission.
- Roll out fapolicyd in permissive mode, then enforce on internet-facing servers.
- Load audit rules from the SCAP profile, make them immutable and forward logs over TLS.
- Stay on supported minor releases and measure time to apply critical errata.
Standards and references
- Red Hat: RHEL 9 Security Hardening
- Red Hat: RHEL 10 Security Hardening
- Red Hat: Blocking and allowing applications by using fapolicyd
- Red Hat: Auditing the system
- Red Hat: Configuring user authentication by using authselect
- Red Hat: Red Hat Enterprise Linux Life Cycle
- CIS: Red Hat Enterprise Linux Benchmarks
Related NHI Mgmt Group resources: Linux Server Hardening Guide · OpenSCAP and Linux Compliance Scanning Guide · SELinux Guide · FreeIPA and Red Hat Identity Management Guide · Ubuntu Server Security Hardening Guide