Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Is there a way to get sudo to not ask for a password? 1

Status
Not open for further replies.

linuxMaestro

Instructor
Jan 12, 2004
183
US
user111@server1 [/root]# sudo cat /etc/sudoers

We trust you have received the usual lecture from the local System
Administrator. It usually boils down to these two things:

#1) Respect the privacy of others.
#2) Think before you type.

Password:
 
# Cmnd alias specification
Cmnd_Alias SUROOT = !/bin/su "", !/bin/su -, /bin/su - [a-z]*, /bin/su [a-z]*, !/bin/su root, !/bin/su - root, !/bin/su -[a-z$
Cmnd_Alias NOTROOT = /bin/cat /etc/sudoers
# Defaults specification
Defaults:ADMINS !lecture, !authenticate

# User privilege specification
root ALL=(ALL) ALL
ADMINS ALL=SUROOT,NOTROOT NOPASSWD: ADMINS
# Uncomment to allow people in group wheel to run all commands
# %wheel ALL=(ALL) ALL

# Same thing without a password
# %wheel ALL=(ALL) NOPASSWD: ALL

I tried NOPASSWD: ADMINS and NOPASSWD: ALL in the # User privilege specification section but it says
>>> sudoers file: syntax error, line 20 <<<
What now?

Any ideas?
 
What about using the sudo -S option so that you can input the password via stdin instead of the terminal?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top