You are not logged in.
Hi guys
For some reason I can't get sudo w/o password working. I entered to sudoers file via visudo:
user ALL=(ALL) NOPASSWD:ALL
... but for some reason it's not working. What gives?
Last edited by Peregrino69 (2016-04-09 21:25:38)
Offline
Check the spacing between ALL=(ALL) and the spacing between NOPASSWD:ALL You may need a specific spacing syntax? Does the visudo give you any syntax errors?
"I have not failed, I have found 10,000 ways that will not work" -Edison
Offline
Does this work?
user ALL=(ALL) NOPASSWD: /usr/bin/sudo
Be Excellent to Each Other...
The Bunsenlabs Lithium Desktop » Here
FORUM RULES and posting guidelines «» Help page for forum post formatting
Artwork on DeviantArt «» BunsenLabs on DeviantArt
Offline
Please post the output of:
sudo grep -v '^#\|^$' /etc/sudoers
Is your user really called "user"?
Offline
check this out: https://wiki.archlinux.org/index.php/Sudoers
btw, you will still have to prepend "sudo" to commands even if it doesn't ask for a password.
Offline
Hi HoaS & damo
Check the spacing between ALL=(ALL) and the spacing between NOPASSWD:ALL You may need a specific spacing syntax? Does the visudo give you any syntax errors?
I've tried both tab and space between the terms, also with or without space between NOPASSWD: ALL. This is a standard Bunsen i.e. Deb8 installation, and I'm not aware of any specific syntax here. Worked fine with Waldorf i.e. Wheezy.
user ALL=(ALL) NOPASSWD: /usr/bin/sudo
Sorry, doesn't work either.
Is your user really called "user"?
LOL no Just pgrino69
Before damo's suggestion:
pgrino69@Bunsen1:~$ sudo grep -v '^#\|^$' /etc/sudoers
Defaults env_reset
Defaults mail_badpass
Defaults secure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
root ALL=(ALL:ALL) ALL
pgrino69 ALL=(ALL) NOPASSWD: ALL
%sudo ALL=(ALL:ALL) ALL
After damo's suggestion:
pgrino69@Bunsen1:~$ sudo grep -v '^#\|^$' /etc/sudoers
Defaults env_reset
Defaults mail_badpass
Defaults secure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
root ALL=(ALL:ALL) ALL
pgrino69 ALL=(ALL) NOPASSWD: ALL
%sudo ALL=(ALL:ALL) ALL
Offline
Ooop!
check this out: https://wiki.archlinux.org/index.php/Sudoers
btw, you will still have to prepend "sudo" to commands even if it doesn't ask for a password.
Hi to you as well I know that one from way back when. Arch Wiki is still one of my preferred resources for a lot of things
HoaS, for comparison the output from my venerable Waldorf workhorse:
Defaults env_reset
Defaults mail_badpass
Defaults secure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
root ALL=(ALL:ALL) ALL
pgrino69 ALL=(ALL) NOPASSWD: ALL
%sudo ALL=(ALL:ALL) ALL
Last edited by Peregrino69 (2016-04-09 18:32:46)
Offline
Adding my username to sudoers using that exact syntax works just fine on my BL (& Arch) systems
I don't know why that's not working, sorry.
Offline
Wait!
Remove your user from the sudo group and try again:
sudo gpasswd -d pgrino69 sudo
The last line over-rides the previous lines and does not specify NOPASSWD for those in the sudo group.
Offline
HoaS saves the day again!
... but I have absolutely on clue what just happened. After following your advise:
pgrino69@Bunsen1:~$ sudo grep -v '^#\|^$' /etc/sudoers
Defaults env_reset
Defaults mail_badpass
Defaults secure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
root ALL=(ALL:ALL) ALL
pgrino69 ALL=(ALL) NOPASSWD: ALL
%sudo ALL=(ALL:ALL) ALL
... plus the output from Waldorf and Bunsen are exactly the same to my eyes... can you possibly clarify this a bit? *confusioned*
Offline
can you possibly clarify this a bit?
All you have done is removed pgrino69 from the sudo group -- the password is still set for those in the sudo group but your user has NOPASSWD set and is no longer in the sudo group.
For your #! system, either pgrino69 was not in the sudo group or the behaviour of `sudo` & /etc/sudoers has changed between wheezy & jessie.
Offline
Oki. I guess that makes sense
Offline
Please add [SOLVED] to the thread title to help others who may have this problem
Offline