[PLUG] Allow User to Run Shell Script As root

John Sechrest sechrest at jas.peak.org
Mon Mar 19 15:20:44 UTC 2012


I am wondering if this really isn't a case of needing to do SUID Scripts.
And if an SUID wrapper would not be the answer?

http://www.tuxation.com/setuid-on-shell-scripts.html

On Sun, Mar 18, 2012 at 11:42 AM, Rich Shepard <rshepard at appl-ecosys.com>wrote:

>   I'm far from competent with /etc/sudoers syntax.
>
>   I have a simple, one-line script in /home/<user>/shell-scripts/homenet.sh
> that I want to have run with root privileges (because it copies
> /etc/resolv.conf.home to /etc/resolv.conf).
>
>   With this line in /etc/sudoers
>
> %users = ALL=(root) NOPASSWD /home/<user>/shell-scripts/homenet.sh
>
> the command, 'shell-scripts/homenet.sh', tells me permission is denied to
> create the file. With no entry in /etc/sudoers but running the comand
> following 'sudo ' I'm told that the user is not allowed to execute the
> script as root on that host.
>
>   Please educate me in the proper syntax for /etc/sudoers so a user can run
> a shell script as root.
>
> TIA,
>
> Rich
>
>
> _______________________________________________
> PLUG mailing list
> PLUG at lists.pdxlinux.org
> http://lists.pdxlinux.org/mailman/listinfo/plug
>
>


-- 
John Sechrest
@sechrest
http://www.oomaat.com



More information about the PLUG mailing list