RHEL 9 must not allow blank or null passwords.

STIG ID: RHEL-09-611025  |  SRG: SRG-OS-000480-GPOS-00227 |  Severity: high |  CCI: CCI-000366 |  Vulnerability Id: V-258094

Vulnerability Discussion

If an account has an empty password, anyone could log in and run commands with the privileges of that account. Accounts with empty passwords should never be used in operational environments.

Check

Verify that null passwords cannot be used with the following command:

$ sudo grep -i nullok /etc/pam.d/system-auth /etc/pam.d/password-auth

If output is produced, this is a finding.

Fix

Remove any instances of the "nullok" option in the "/etc/pam.d/password-auth" and "/etc/pam.d/system-auth" files to prevent logons with empty passwords.

Note: Manual changes to the listed file may be overwritten by the "authselect" program.