Executing Root Commands from user levelby curtisb (Monk)
|on Jan 18, 2002 at 20:06 UTC||Need Help??|
curtisb has asked for the wisdom of the Perl Monks concerning the following question:
Ok, I have a question. I want to execute a script, which is currently in shell scripting (sh), that does an su to root. Where you have to enter the password. Then I want to execute the commands as root then exit back to user level.
What I have written is this:
Now I know that there is a better way to do this through perl. Does anyone have any clues on where I should start looking. My biggest problem is switching from one user to root, excuteing the commands, and then exiting.