Re: run command as root within script

2004-01-07 Thread Monique Y. Herman
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 aw

Re: run command as root within script

2004-01-07 Thread Andrew Pritchard
> 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? Yes - learn to use sudo >From the man page: DESCRIPTION sudo allows a permitted user to execute a command as the superuser or another user, as sp