View Full Version : run script on boot from specified user?
Daerious
03-04-2008, 04:31 PM
I'm needing to run a script during boot, but it must be ran as a specific user, not root. Can anyone tell me the proper way of doing this?
Hi, use this:
su - USER -c "COMMAND TO RUN"
replace USER and COMMAND
Daerious
03-04-2008, 07:56 PM
thanks Rick, that worked perfectly, i assume adding that line to rc.local is an acceptable practice? (Debian 4)
yes, that is fine. my rc.locals are full of start up stuff.
vBulletin® v3.7.1, Copyright ©2000-2009, Jelsoft Enterprises Ltd.