apologies for a dummy question: On my CentOS 7.5 I've added my user to a wheel group and in visudo uncommented the line that wheel members can run all commands without a password. Logged in/out but it doesn't work. Added my user explicitly to run all commands without the password, logged in/out, still doesn't work. What am I doing wrong here? Many thanks in advance!
1 Answer
Possibly, if anyone still needs the answer, I also encountered the same situation and managed to cope with the problem following way:
In the section "example entries" of the arch-wiki for sudo
command
https://wiki.archlinux.org/index.php/Sudo
There is a possible variant:
- Open your sudoers file with
sudo visudo
- After the
Defaults
section (was commented in my file) add the following line
Defaults:%wheel !authenticate
Also, if you want to enable passwordless sudo for a particular user, you can add the next line instead:
Defaults:YOUR_USERNAME !authenticate
where YOUR_USERNAME should be replaced with your username.
/etc/passwd
and the respectivesudoers
-file? (Please make sure that your system does not save the password hash in the passwd file, otherwise cut it out....). Doesvisudo -c
show any errors?{}
button, and (b) it's easier for us to read and consequently help you.