On Sun, 23 Sep 2012, Russell Johnson wrote:

> pamela ALL= /full/path/to/script

   Thanks, RUssell.

> 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.

   A) she's not going to edit the script and 2) no one else has access to her
portable.

> 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

   This is not practical because the appropriate commad depends on the
results of a test.

> pamela ALL= NOPASSWD:/path/to/cmd1,/path/to/cmd2

   I thought that's were NOPASSWD went; thanks again.

> Finally, you'll need to put 'sudo' in front of the command in the script.

   To run the entire script?

Rich

_______________________________________________
PLUG mailing list
[email protected]
http://lists.pdxlinux.org/mailman/listinfo/plug

Reply via email to