Help - Search - Members - Calendar
Full Version: Running Startup Script As Different User
Linuxhelp > Support > Technical Support
Hello all,
I have a script (specifically one that just runs a single program to start a license server).
The catch is that it has to be run by the user 'matlab'.

How do I go about making it so that when the computer boots up this is automaticallly done as opposed to having to su to user matlab and then running it manually?

in the startup script, you would use the command:

su - matlab -c script_to_start

Note: The users environment might not load, so in the script_to_start, be sure to source the users .bashrc and/or .bash_profile file if required at the beginning of the script.
my experience is that su may not run from scripts.
If thats the case for you - try using sudo (
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2018 Invision Power Services, Inc.