[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Making Script Run as Super User



Jeff Noxon <jeff@planetfall.com> writes:

> On Sun, Apr 12, 1998 at 02:41:34PM -0500, Butch Kemper wrote:
> > 
> > I want a script to execute as the Super User.  I have tried several things
> > with the "s" attribute but have not been successful.
> 
> Linux won't let you create suid shell scripts -- they're insecure.
> The "s" attribute is ignored on shell scripts.  You can probably do what
> you want with the sudo package.
> 
> Jeff

Most scripts won't execute as super user for good reason.
HOWEVER, you can get around this either by writing an suid C wrapper
program (basically just a C program that exec's your script) or by
using perl (which implements its own wrapper program).

I'd actually recommend either writing the script in perl or using a
perl script to call your shell script, as perl helps you avoid some
annoying insecure practices.


--
To UNSUBSCRIBE, email to debian-user-request@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org


Reply to: