View Full Version : Quick sudoers question.
michaelsanford
November 21st, 2004, 01:32 AM
Checking some of the very powerful options in man sudoers I came acorss the ability to stop promopting me for a password every time I type $ sudo something.sh
However, I've noticed none of these work:
username ALL = NOPASSWD: ALL
username localhost = NOPASSWD:ALL
%group ALL=NOPASSWD:ALL
...or any senseful combination of these things.
But this does:
Defaults:username !authenticate
Any reason for that ? Is there some other default that over-rode that ?
Darkshadow
November 21st, 2004, 07:51 AM
I got this to work (though I turned it back off):
%admin ALL = (ALL) NOPASSWD: ALL
nixgeek
November 21st, 2004, 08:39 AM
I've done that on my Linux desktop just for ease of use. It does become annoying to type in the password for almost everything that requires it under the command line. For obvious reasons, it's not recommended on critical machines like servers and such.
michaelsanford
November 21st, 2004, 10:28 AM
Hmm, odd that it doesn't work for me. Maybe I'm missing a parameter somewhere (hears an eerie voice - "That's what visudo's foooor").
Is it possible to specify nopasswd only if I'm at the con ?
pedz
November 21st, 2004, 12:04 PM
The thing I do is "sudo bash"
This puts me in a shell with a prompt and then I can run around as root and do whatever i want to do.
I guess "sudo $SHELL" would be more generic.
Darkshadow
November 21st, 2004, 06:51 PM
Well, visudo is the recommended way to edit the file. It'll let you know if you made an error in the syntax.
That said, I edited the file with SubEthaEdit. :D
I think you have to have the spaces just as I put them in my example. I just tried it again with a regular user by putting in their group and the same line, and that user was able to use sudo without a password.
scruffy
November 21st, 2004, 08:43 PM
I think visudo does some basic syntax checking for you, to minimize the chance that you'll mess things up. And it locks the file, to prevent two people mucking things up on a multi user system
wadesworld
November 30th, 2004, 10:08 PM
The thing I do is "sudo bash"
This puts me in a shell with a prompt and then I can run around as root and do whatever i want to do.
I guess "sudo $SHELL" would be more generic.
Try "sudo -s".
Wade
vBulletin® v3.8.4, Copyright ©2000-2010, Jelsoft Enterprises Ltd.
Search Engine Optimization by
vBSEO 3.3.2