Ubuntu 24.04 LTS must not allow accounts configured in Pluggable Authentication Modules (PAM) with blank or null passwords.

STIG ID: UBTU-24-300028  |  SRG: SRG-OS-000480-GPOS-00227 |  Severity: high |  CCI: CCI-000366 |  Vulnerability Id: V-270714

Vulnerability Discussion

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

Check

To verify null passwords cannot be used, run the following command:

$ grep nullok /etc/pam.d/common-password

If this produces any output, this is a finding.

Fix

If an account is configured for password authentication but does not have an assigned password, it is possible to log on to the account without authenticating.

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