Answer the question
In order to leave comments, you need to log in
How to run .sh script as root while under another user in one line?
We have user user.
Switching to root is done with the su command.
Task: run the /home/run.sh script from the terminal with one command as root while under the user user.
Answer the question
In order to leave comments, you need to log in
sudo or suid will do?
PS suid on shll-scripts in the vast majority of cases - does not work... Thanks comrade. jcmvbkbc for details.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question