LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   Starting a daemon in an init.d bootup script without root being the owner (https://www.linuxquestions.org/questions/linux-general-1/starting-a-daemon-in-an-init-d-bootup-script-without-root-being-the-owner-585792/)

BobTheSlob 09-19-2007 07:39 AM

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

bsdunix 09-19-2007 11:19 AM

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


All times are GMT -5. The time now is 12:40 PM.