sudo without password


cp_clegg

Still Fresh
Joined
May 4, 2011
Messages
19
I want to be able to sudo any command without having to enter a password. For some reason my changes to the sudoers file do not seem to be having an effect. Here is what I have tried:


Method 1:



Code:
sudo visudo

Added my user under root like this:



Code:
# User privilege specification

root        ALL=(ALL) ALL

cpclegg     ALL=(ALL) NOPASSWD: ALL



Method 2:



Code:
sudo visudo

Allowed wheel group to have no password for all:



Code:
%wheel  ALL=(ALL) NOPASSWD: ALL

Then added my user to the wheel group in /etc/group:



Code:
wheel:x:1000:cpclegg


Neither of these methods has worked and I am still prompted for my password when I sudo various commands.


Can anyone help with this?
 
giving me sudo-access without pw is on of the first things I do, when installing a linux-system...


this is working for me as described in your post.


sorry, it should've been working
 
Well I couldn't get this to work the way it is supposed to, even after reflashing. I found an alternate solution though and I'm just posting in case anyone else ran into the same problems.


Instead of the NOPASSWD option, I used the global sudoers setting which just completely turns off authentication for sudo.


"sudo visudo" then add this line:



Code:
# Defaults specification

Defaults    !authenticate
 
Back
Top