LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Startup service run by user other than root? (https://www.linuxquestions.org/questions/linux-newbie-8/startup-service-run-by-user-other-than-root-49452/)

WeNdeL 03-12-2003 11:12 AM

Startup service run by user other than root?
 
How do I specify a certain service to be run at start (in certain runlevels) by a user other than root?

With respect to RH 7.2 and up...

Crashed_Again 03-12-2003 11:16 AM

To see what is running on certain runlevels you can do:

chkconfig --list

as root. You shouldn't have to change the user for each service. The default settings are what you want.

WeNdeL 03-12-2003 03:02 PM

well... I want to add my own service and I don't want root to run it...

AltF4 03-13-2003 06:41 AM

try this in your startup script:
su -c "/usr/local/bin/myservice.startscript" myuser

WeNdeL 03-13-2003 11:41 AM

that is how I have it running for the meantime... but this hits every run level right?

AltF4 03-20-2003 02:57 PM

If you fully understand the run level system and the structure of rc{X.}d files used (S-files and K-files) it should be no problem to clone a similar service already running (e.g. lpd) and install the apropriate links, otherwise you might want to read some manual pages (init, init.d, etc.)


All times are GMT -5. The time now is 07:38 PM.