I'm currently struggling to give a particular user access to run a certain subset of commands without a password using sudo. From what I've read, my syntax should be working, however, when I try and use one of the scripts in the RELEASE group, I'm still asked for the password.

Cmnd_Alias RELEASE = /home/release/release.sh
release ALL=SERVICES,LOCATE,PROCESSES,SECONDLINE,NOPASSWD:RELEASE

Could someone cast their eyes over my syntax, and advise if it's incorrect. I've seen another serverfault question with the same issue, and the advise was to use a line like this:

Defaults!WITHOUTPW        !authenticate

This still doesn't work however.

Any ideas?

link|improve this question
feedback

1 Answer

There are two points to say:

  1. If you mistyped a line in sudoers file, you will be warned given that you are editing the file using visudo tool.
  2. You configuration may be overwritten by a following line in the sudoers file. You have to look at your complete file. For better help, you can post the file contents.
link|improve this answer
Thanks for getting back to me. I made a minimal test case with which to demonstrate the issue, and guess what, in doing that, I've solved my own problem, and it was just me being pretty silly and having a typo in the name of the script I was trying to run. There's actually about 30 different scripts in the RELEASE Cmnd_Alias. I should have done the test case earlier. Thanks again for your response! – Tom Jan 30 at 15:39
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.