ansible-lockdown / RHEL7-STIG

Ansible role for Red Hat 7 STIG Baseline
MIT License
283 stars 144 forks source link

Improve sudo user passwd check - RHEL-07-010340 #428

Closed uk-bolly closed 1 year ago

uk-bolly commented 1 year ago

Enhancement [] Summary of Request The check for the user having a sudo password to ensure users do not get locked out on a later controls fails if the user is root as this does not required sudo

Describe alternatives you've considered Do not run when user == root Get the command to run if - ansible_env.SUDO_USER is defined

Suggested Code conditional for ansible_env.SUDO_USER is defined This covers off that any super user not just root could have full su permissions so will only run if the playbook being run using a user that requires sudo