You are not logged in.
First of all, I researched and I am not talking about just the NOPASSWD option in /etc/sudoers.
Here's my /etc/sudoers file (partial):
root ALL=(ALL) ALL
## Uncomment to allow members of group wheel to execute any command
%wheel ALL=(ALL) ALL
## Same thing without a password
# %wheel ALL=(ALL) NOPASSWD: ALL
## Uncomment to allow members of group sudo to execute any command
# %sudo ALL=(ALL) ALL
## Uncomment to allow any user to run sudo if they know the password
## of the user they are running the command as (root by default).
# Defaults targetpw # Ask for the password of the target user
# ALL ALL=(ALL) ALL # WARNING: only use this together with 'Defaults targetpw'
## Read drop-in files from /etc/sudoers.d
## (the '#' here does not indicate a comment)
#includedir /etc/sudoers.d
(I have obviously added myself to wheel).
Now if I use the NOPASSWD option, sudo works without a password, as expected. However, even if I run a normal program, like yaourt, it automatically gives it sudo permissions (I'm guessing that's because it's running with my uid). For example, I can run
yaourt -Syu --noconfirm
and update packages, no confirmation at all.
What I want is for sudo to ask for a binary confirmation prompt, instead of a password.
How do I set it up that way?
Last edited by prakharsingh95 (2014-10-03 22:15:57)
A person who never made a mistake never tried anything new.
Offline
all your lines are commented. ?
ezik
Offline
yaourt most probably runs "sudo pacman", in case you weren't aware of that.
Offline
all your lines are commented. ?
ezik
%wheel ALL=(ALL) ALL <<< Nope.
yaourt most probably runs "sudo pacman", in case you weren't aware of that.
That's sort of the problem. When yoaurt runs sudo pacman, it gets superuser without me knowing. Any script I run will get superuser just by using sudo. I want sudo to ask for my permission, but not my password (fingerprint actually) over and over again.
A person who never made a mistake never tried anything new.
Offline