Join our Newsletter — 33% off our NHI Course
Home› Guides› Red Hat Enterprise Linux Security Hardening Guide: Crypto…
Guide Endpoint Security

Red Hat Enterprise Linux Security Hardening Guide: Crypto Policies, SCAP Profiles, fapolicyd and Identity

PDF for newsletter subscribers · free to read online

← All guides
By NHI Mgmt Group, edited by Lalit Choda Updated 8 November 2026 13 min read
On this page

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-policies controls 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 with fips-mode-setup --enable does not guarantee FIPS 140 compliance and FIPS mode cannot be cleanly disabled afterwards.
  • Use the shipped SCAP profiles, carefully. scap-security-guide provides CIS, STIG, PCI DSS, HIPAA, OSPP, ANSSI, E8 and other profiles; scan with oscap xccdf eval first, because --remediate can break a system and has no automated revert.
  • Manage authentication with authselect, not by editing PAM. Generated /etc/pam.d files say "Do not modify this file manually"; use authselect select sssd with-faillock and 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 with ausearch -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 profileIdentity sourceWhen to use
sssd (default)SSSD in front of LDAP, Red Hat Identity Management (IdM) or Active DirectoryAlmost every fleet: central accounts, offline caching, host-based access control and sudo rules from the directory
winbindDirect Active Directory membership through Samba winbindHosts that also serve SMB shares to Windows clients
minimalLocal files onlyAppliances, bastions that must work without a directory, containers
  • Features: append features to the profile, for example authselect select sssd with-faillock with-mkhomedir, and add with-smartcard for PIV or CAC login. Check the current state with authselect current and record it before any change, so it can be reverted.
  • Do not hand-edit: authselect regenerates /etc/pam.d/system-auth and password-auth, and /etc/nsswitch.conf changes belong in /etc/authselect/user-nsswitch.conf followed by authselect apply-changes. Hand edits are lost or, worse, silently kept on some hosts and not others. Red Hat also advises against changing profiles that ipa-client-install or realm join configured.
  • Directory joins: ipa-client-install joins IdM (FreeIPA) and realm join joins Active Directory; both create a host keytab in /etc/krb5.keytab that 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 wheel group is the conventional sudo group on RHEL; prefer narrow rules in /etc/sudoers.d/ or IdM sudo rules over blanket ALL. 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-faillock enables pam_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_u or sysadm_u so 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.socket where 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 identityWhere it livesRiskControl
Host Kerberos keytab/etc/krb5.keytabCopying it lets an attacker impersonate the host to IdM or ADRoot-only permissions, rotate on rebuild, remove the host object at decommission. See the Linux Service Accounts and Keytab Management Guide
Subscription identity certificateCreated by subscription-manager register or rhc connectIdentifies the host to Red Hat services and InsightsUnregister at decommission so the inventory stays true
Activation keysHybrid Cloud Console; used with the organisation ID at registrationAnyone holding a key and org ID can register systems into your accountKeep keys out of public images and repos; limit who can create and edit them
Satellite or automation credentialsAnsible inventories, Satellite remote execution SSH keysPush root commands to every hostDedicated service accounts, keys in a vault, sudo limited to required commands. See the SSH Key Management Guide
Clevis and Tang bindingsLUKS header metadataDisk unlocks automatically on the trusted networkTang servers on a protected network, TPM 2.0 binding for laptops
Application service accountsLocal users or IdM service principalsInteractive 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 with augenrules --load. Red Hat ships sample rules in /usr/share/audit/sample-rules/ (for example 30-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. Use 99-finalize.rules to make the rule set immutable until reboot.
  • auditd resilience: Red Hat's strict-environment guidance puts /var/log/audit/ on its own mount point, sets max_log_file_action = keep_logs, space_left_action to email or exec, and disk_full_action to halt or single. 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 logging RHEL 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 -i for 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

PolicyWhat it enforcesUse
DEFAULTTLS 1.2 and 1.3, SSH2, IKEv2; RSA and DH minimum 2048-bit; SHA-1 signatures disallowed; CBC disabled for SSHGeneral servers
FUTURERSA and DH minimum 3072-bit; 128-bit ciphers disabled; SHA-1 disallowed in DNSSEC and HMAC; CBC disabled except KerberosInternal high-assurance systems; test for interoperability first
FIPSFIPS 140 conformant algorithms; minimum 2048-bit; SHA-1 signatures disallowedRegulated and government workloads, set at install
LEGACYCompatibility with RHEL 6 and earlier; SHA-1 and SSH CBC allowedAvoid; 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

  1. Install right: minimal package set, separate /boot, /, /home, /tmp and /var/tmp partitions on bare metal, LUKS2 on data volumes, and fips=1 on 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.
  2. Post-install: dnf update, confirm firewalld is running and enabled, disable services you do not need (for example systemctl disable cups), and confirm getenforce returns Enforcing.
  3. Pick a profile: choose one SCAP profile per system class, for example xccdf_org.ssgproject.content_profile_cis_server_l1, _stig (or _stig_gui for 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.
  4. 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.
  5. Remediate through code: generate the Ansible playbook or Bash script for the profile and run it on a pilot ring, rather than --remediate in place, because Red Hat warns remediation can make a system non-functional and offers no automated revert. Rollback is a snapshot or rebuild.
  6. Execution control: install fapolicyd with permissive = 1 in /etc/fapolicyd/fapolicyd.conf, add application paths with fapolicyd-cli --file add <path> --trust-file <name>, check fapolicyd-cli --check-config and --check-trustdb, then set permissive = 0. Consider integrity = sha256 once the trust set is stable; the default is none.
  7. 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.
  8. 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 --check reporting it enabled.
  • Blind --remediate in 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.d that 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 controlNIST SP 800-53 Rev. 5NIST CSF 2.0CIS Controls v8.1
SCAP profiles and drift scansCM-2, CM-6, RA-5PR.PS-01, ID.RA-014, 7
Crypto policies, FIPS, LUKSSC-8, SC-13, SC-28PR.DS-01, PR.DS-023
authselect, SSSD, IdM, faillockIA-2, IA-5, AC-2PR.AA-015, 6
sudo rules, HBAC, SELinux usersAC-6PR.AA-055, 6
fapolicyd, USBGuardCM-7, CM-11PR.PS-022
auditd, rsyslog TLS, AIDE, KeylimeAU-2, AU-9, AU-12, SI-4, SI-7PR.PS-04, DE.CM-098
Supported release and errataSI-2ID.AM-087

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=1 where required.
  • Assign one SCAP profile per system class, scan with oscap xccdf eval and 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

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

PDF for subscribers

Take this guide with you

Every section, table and checklist in one PDF, with links to the sources and related guides. Subscribe to our weekly NHI & AI Identity Journal and we’ll email you a download link.

Free weekly newsletter

Subscribe to the NHI & AI Identity Journal

The latest on NHI and Agentic AI security – articles, research, breaches, news and events every week.

Bonus 33% off our NHI Course when you subscribe.

NHIMG Editorial Note
Researched and written by the NHI Mgmt Group editorial team using AI tools, under the editorial direction of Lalit Choda. Facts are drawn from the sources listed on this page and checked by our automated quality process. Last updated 8 November 2026. Spotted an error? Use our contact page.
NHI Mgmt Group, the independent authority on Non-Human Identity, IAM and Agentic AI security. nhimg.org

PDF Downloads for Newsletter Subscribers

Get the guide

Enter your details and we’ll email you a download link.

The full guide is free to read online. The PDF is a thank you for subscribing.

Fill in all fields marked * and tick the PDF box to continue.