LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (http://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Running a process at boot time under a regular user account (http://www.linuxquestions.org/questions/linux-newbie-8/running-a-process-at-boot-time-under-a-regular-user-account-738089/)

geek.ksa 07-06-2009 11:02 AM

Running a process at boot time under a regular user account
 
Hi,

is it possible to run a process at boot time under a regular user account? i.e. not root?

if yes, please let me know which file to edit.

best regards

catkin 07-06-2009 12:44 PM

Hello geek.ksa :)

All the boot scripts are run as root but you can use the su command to switch user.

As for which is the most appropriate place to add that, it depends on which distro you are using and at what point in the boot process you want it to run.

More information please!

Best

Charles

cmdln 07-06-2009 01:41 PM

Since you did not specify a distro I would guess the most generic way to do what you want is by adding something like the following to your /etc/init.d/rc.local or whatever it happens to be the generic place to toss startup stuff for your distro.

Code:

su -c "<your command here>" <your unprivleged user>

geek.ksa 07-06-2009 02:31 PM

Thanks guys, su -c never crossed my mind, because i never used it.

Thanks cmdln for the tip.

Thanks all.


All times are GMT -5. The time now is 06:30 AM.