I have a group of users (wheel for example) that I want to add to /etc/sudoers for all commands i.e.:

%wheel ALL=(ALL) ALL

In this scenario, if users are set up correctly, everyone in wheel will be prompted for password upon trying to use an elevated command. For any user that does not have a password set (via /etc/shadow), the user will not be prompted for a password and command will succeed....this presents a problem for me. I do not want users with no passwords set to be able to succeed in doing this.

I cannot find a possible way, specifically just through /etc/sudoers, to make any elevated command fail with users with no passwords set. Let me know if I am missing something...

And yes, I know I can approach the problem differently outside of /etc/sudoers (chicken and egg) and know of ways to do it...not question of that though. Any tips would be greatly appreciated!

  • decided to be enforced with some pam module configuration – blieberman Sep 27 '17 at 15:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.