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

Re: run command as root within script



On Wed, 07 Jan 2004 at 22:20 GMT, Rick Weinbender penned:
> Is there a way within a bash script to temporarily su to the root
> user, then run some commands, then go back to the original user?  * Or
> can you temporarily (within a script), assign the current user to have
> more rights, then take away those rights?  bash scripting is fairly
> new to me.
> 
> Thanks, -Rick

I'm not sure about the answer to your explicit question, but I suppose
you could make a program setuid and have it be owned by root.

(I'm not saying it's a good idea, mind, just that it's possible.)

-- 
monique



Reply to: