View Single Post
Posts: 50 | Thanked: 0 times | Joined on Nov 2005
#5
Yo Chuck,

I too want to be able to run shell scripts as root, but I want to be sure I'm doing this right before I brick my 770:

On the 770, can I only edit /etc/sudoers using visudo? If so, how (typing visudo in xterm doesn't work)? I've been using joe as an editor, since I really hate the sadistic vi. Would joe work as well?

To enable running a shell script with root privs, do I need to add this line to /etc/sudoers:

user ALL = NOPASSWD: /bin/sh

Yes?

Assuming this is correct, can I then assume the shell script will run as root if that's how I'm logged in, or do I need to insert a "sudo gainroot" at the start of the script?


Thanks,

John