Why is a user not being asked to enter a password for sudo even though configured to need one?
Issue
- The user
exampleusershould be asked to enter a password when using thesudocommand. -
Permissions defined in the
/etc/sudoers.d/1-exampleuserfile as such:exampleuser ALL=ALL -
Contrary to the setting in
/etc/sudoers.d/1-exampleuser, the userexampleusercan execute commands withsudowithout entering a password. For example:[exampleuser@examplelinux ~]$ sudo whoami root
Environment
- Red Hat Enterprise Linux (RHEL)
- 5
- 6
- 7
- 8
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.