New on LowEndTalk? Please Register and read our Community Rules.
All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.
All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.
How to run a Program under other user on start
Hey
I got a question.
With my VPS i want to start a few programs upon startup
i edited /etc/rc.local file to start a few programs upon startup
But now my question is, how can i run other programs such as TS3 with user teamspeak (example user) upon startup of the VPS?
Because running ts3 in root is dangerous (security issues)
Can someone help me?
Comments
I quick google gave me this as an option to use
sudo start it as the user you want to run it as.
link to page I found it on.
http://forum.teamspeak.com/showthread.php/55383-Howto-install-TeamSpeak-3-server-on-Ubuntu-10-04-(Lucid)
I know sudo
But howto do that on Startup
When the VPS reboots, i want to start it instantly
In rc.local just make it execute a shell script with that in it
@Daniel thanks that works
man su
This is in my .sh script now:
And it works perfectly
Won't suid-script be enough? I've never tried though
save few bit
That probably won't work.
His start script probably uses relative paths (e.g. ./hl2_srcs) instead of absolute paths (./home/teamspeak/hl2_srcs) so its necessary to cd.