1

I would like to configure sudo such that users can run some specific commands without entering a password (for convenience) and can run all other commands by entering a password.

This is what I have, but this does not work; a password is always required:

Defaults    env_reset Defaults    timestamp_timeout = 1 

root    ALL=(ALL:ALL) ALL 

# Allow members of group sudo to execute any command 
%sudo   ALL=(ALL:ALL) NOPASSWD: /usr/sbin/pm-suspend, /usr/bin/apt-get, PASSWD: ALL 

#includedir /etc/sudoers.d

Note that this is a debian system which uses this adding users to the "sudo" group method.

Thanks.

1 Answer 1

4

You should be able to do something like:

Cmnd_Alias                WITHOUTPW = /path/to/cmd1, /path/to/cmd2
Defaults!WITHOUTPW        !authenticate
2
  • I get sudo: unknown defaults entry nopasswd'` when running commands in the list. I'll play with it and see if I can figure out what it's doing.
    – jberryman
    Mar 16, 2011 at 15:42
  • @jberryman: Sorry, I had it wrong. I think it should be !authenticate. I've revised my answer. Mar 16, 2011 at 16:06

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .