LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 09-19-2007, 07:39 AM   #1
BobTheSlob
LQ Newbie
 
Registered: May 2005
Posts: 14

Rep: Reputation: 0
Starting a daemon in an init.d bootup script without root being the owner


Hello all
I'd like to start this line

alsaplayer -i daemon -s alsasaemon

In my bootmisc.sh script in /etc/init.d

It works fine, but the owner of the process is root when I do that, and then when I log in as myself and try to do

alsaplayer -e <some song>

I can't because root owns the daemon.

The specifics of the program are not important for this. How do I run the program in a bootup script and change the owner to myself? Or anything that will let me use the daemon.

Thanks
 
Old 09-19-2007, 11:19 AM   #2
bsdunix
Senior Member
 
Registered: May 2006
Distribution: BeOS, BSD, Caldera, CTOS, Debian, LFS, Mac, Mandrake, Red Hat, Slackware, Solaris, SuSE
Posts: 1,761

Rep: Reputation: 80
Try this:
Code:
# sudo -u username /path/to/command
You might need to edit the /etc/sudoers configuration file.

http://linux.die.net/man/8/sudo
 
  


Reply



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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Run init script as daemon isuck@linux Linux - Software 5 02-12-2007 01:29 AM
starting script, init by copy/create file in (samba) folder? muab Linux - General 7 06-22-2005 06:02 PM
how to see the daemon owner? noir911 *BSD 2 08-24-2004 12:57 PM
Starting mysql daemon as user rather than root arubin Slackware 8 05-10-2004 04:03 PM
How do you stop a daemon from starting at bootup?? rberry88 Fedora 6 02-18-2004 01:44 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 01: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
Open Source Consulting | Domain Registration