Jonyboy
New Member
Hi all,
This script logs in as root and changes the permissions of someone elses files.
But once the script runs su i have to type Exit in the command line and then it will run the rest of the script as not root.
I was wondering how to make a script log in as root and then run run the rest of the commands.
This script logs in as root and changes the permissions of someone elses files.
But once the script runs su i have to type Exit in the command line and then it will run the rest of the script as not root.
I was wondering how to make a script log in as root and then run run the rest of the commands.
Code:
#/bin/bash
su # Script stops here
chmod 777 -R /home/jonathan # I type exit in the terminal and script resumes
exit # Script cant execute previous command