Skip to content

Update pam_rhel.yml - #962

Open
je4yfc wants to merge 1 commit into
dev-sec:masterfrom
je4yfc:pam-fix
Open

Update pam_rhel.yml#962
je4yfc wants to merge 1 commit into
dev-sec:masterfrom
je4yfc:pam-fix

Conversation

@je4yfc

@je4yfc je4yfc commented Jul 21, 2026

Copy link
Copy Markdown

This fixes #922.

The current RHEL PAM tasks create system-auth-local and password-auth-local as root:root with mode 0640. that makes the files readable only by root, since there is no standard pam group that unprivileged PAM consumers belong to. That breaks applications such as swaylock and xscreensaver, which call into PAM as the logged-in user and need to read the relevant service configuration.

I checked the likely benchmark lineage for this setup. The RHEL 7 STIG guidance explains the use of system-auth-local and password-auth-local to prevent authconfig from overwriting hardened PAM configuration, but I could not find a requirement that these files be unreadable by ordinary users. Current ComplianceAsCode-generated RHEL 9 content also uses 0644 for /etc/pam.d/password-auth.

PAM configuration files generally do not contain secrets. Their integrity matters, but that remains protected by root:root ownership and the absence of group or world write permissions. If a PAM module requires a secret, that secret should live in a separate root-only file rather than relying on the entire PAM policy being unreadable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

os-hardening: Restrictive permissions on pam configuration breaks pam services running as user

1 participant