LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices



Reply
 
Search this Thread
Old 03-12-2003, 12:12 PM   #1
WeNdeL
Member
 
Registered: Oct 2002
Location: At my desk...
Distribution: RedHat, Fedora, Ubuntu
Posts: 344

Rep: Reputation: 30
Question 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...
 
Old 03-12-2003, 12:16 PM   #2
Crashed_Again
Senior Member
 
Registered: Dec 2002
Location: Atlantic City, NJ
Distribution: Ubuntu & Arch
Posts: 3,503

Rep: Reputation: 57
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.
 
Old 03-12-2003, 04:02 PM   #3
WeNdeL
Member
 
Registered: Oct 2002
Location: At my desk...
Distribution: RedHat, Fedora, Ubuntu
Posts: 344

Original Poster
Rep: Reputation: 30
well... I want to add my own service and I don't want root to run it...
 
Old 03-13-2003, 07:41 AM   #4
AltF4
Member
 
Registered: Sep 2002
Location: .at
Distribution: SuSE, Knoppix
Posts: 532

Rep: Reputation: 31
try this in your startup script:
su -c "/usr/local/bin/myservice.startscript" myuser
 
Old 03-13-2003, 12:41 PM   #5
WeNdeL
Member
 
Registered: Oct 2002
Location: At my desk...
Distribution: RedHat, Fedora, Ubuntu
Posts: 344

Original Poster
Rep: Reputation: 30
that is how I have it running for the meantime... but this hits every run level right?
 
Old 03-20-2003, 03:57 PM   #6
AltF4
Member
 
Registered: Sep 2002
Location: .at
Distribution: SuSE, Knoppix
Posts: 532

Rep: Reputation: 31
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.)
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Service won't start unless run as root user gauge73 Linux - General 3 05-07-2005 11:37 PM
Is it possible to start a service but not as a root user appas Linux - Software 1 10-16-2004 12:26 AM
Run program on startup as user startail Linux - Software 2 10-08-2004 06:06 AM
how do I make sure that the user that is going to run the script is a root user??? nikold01 Linux - General 3 09-10-2004 08:54 AM
Starting a service as non root user? dee3lmo Linux - General 2 07-30-2004 08:37 PM


All times are GMT -5. The time now is 05:16 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration