How to , and other stuff about linux, photo, php … A linux, photography blog. To remember some linux situation, and fix them quickly.

June 7, 2012

Run a script as a different user

Filed under: Linux — Tags: , , , , — admin @ 12:16 pm

Well if you want to run a script as diferent user you should try to run with su comand.
If you will run like this

su - x -c "/path/script.sh"
after the script is run the su comand return at your user.

Powered by WordPress