Why is a user not being asked to enter a password for sudo even though configured to need one?
Issue
- The user
exampleuser
should be asked to enter a password when using thesudo
command. -
Permissions defined in the
/etc/sudoers.d/1-exampleuser
file as such:exampleuser ALL=ALL
-
Contrary to the setting in
/etc/sudoers.d/1-exampleuser
, the userexampleuser
can execute commands withsudo
without 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.