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... |
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. |
well... I want to add my own service and I don't want root to run it...
|
try this in your startup script:
su -c "/usr/local/bin/myservice.startscript" myuser |
that is how I have it running for the meantime... but this hits every run level right?
|
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. |