SV-239136r675216_rule
V-239136
SRG-OS-000373-GPOS-00156
PHTN-67-000065
CAT II
10
Check the configuration of the "/etc/sudoers" and "/etc/sudoers.d/*" files with the following command:
# visudo
OR
# visudo -f /etc/sudoers.d/<file name>
Remove any occurrences of "NOPASSWD" tags associated with user accounts with a password hash.
At the command line, execute the following commands:
# grep -ihs nopasswd /etc/sudoers /etc/sudoers.d/*|grep -v "^#"|grep -v "^%"|awk '{print $1}'
# awk -F: '($2 != "x" && $2 != "!") {print $1}' /etc/shadow
If any account listed in the first output is also listed in the second output, this is a finding.
V-239136
False
PHTN-67-000065
At the command line, execute the following commands:
# grep -ihs nopasswd /etc/sudoers /etc/sudoers.d/*|grep -v "^#"|grep -v "^%"|awk '{print $1}'
# awk -F: '($2 != "x" && $2 != "!") {print $1}' /etc/shadow
If any account listed in the first output is also listed in the second output, this is a finding.
M
5323