I didn't test these, but I believe the lines are correct. To do what you want, the line would be:
pamela ALL= /full/path/to/script However, if you do this, and Pamela were to edit that file, or worse, someone else were to edit that file, and Pamela runs it, the whole thing is running as root, and that could be bad. Add a 'rm -rf /' to the file, and root just wiped out the system. I suggest allowing Pamela to run the two commands she needs to as root. Which would look like this: pamela ALL= /path/to/cmd1,/path/to/cmd2 If you want her to be able to run those two commands without being prompted for a password, put NOPASSWD: in front of the commands: pamela ALL= NOPASSWD:/path/to/cmd1,/path/to/cmd2 Finally, you'll need to put 'sudo' in front of the command in the script. On Sep 23, 2012, at 3:30 PM, Rich Shepard <[email protected]> wrote: > I read the sudoers man page and look at the examples and still don't grok > how to make a simple entry: I want to allow username 'pamela' to run a shell > script in her home directory as root because the script runs two commands > that need root permission. > > Do I need to set up an alias for this, then assign her to that alias? > > In essence, I'd like something like this in /etc/sudoers: > > pamela /home/pamela/shell-scripts/iface.sh root > (username) (command) (as root) > > A clue would be very nice, > > Rich > > _______________________________________________ > PLUG mailing list > [email protected] > http://lists.pdxlinux.org/mailman/listinfo/plug Russell Johnson [email protected] _______________________________________________ PLUG mailing list [email protected] http://lists.pdxlinux.org/mailman/listinfo/plug
