[opensuse-factory] Running daemon as a user
Hi, Working on OpenNebula. The upstream source provides a script to start a daemon. With a couple of patches I turned the script into an init script that keeps rpmlint quiet. In the package I put the patched script into /etc/init.d. The problem I now have is that I do not want to run the daemon as root. The implication would be that root would have to have password less login enabled on all nodes that are part of the cloud. Is there a way to run the daemon as a specific user? The package also creates a user account for the cloud administrator and the daemon should run as this user. Should I try something like "sudo -u USERNAME PATH_TO_DAEMON" in the init script or are there better/other ways to get his done. The user does not have a password, thus the account cannot login interactively. Help is appreciated. Thanks, Robert -- Robert Schweikert MAY THE SOURCE BE WITH YOU SUSE-IBM Software Integration Center LINUX Tech Lead rschweikert@novell.com rschweikert@ca.ibm.com 781-464-8147 -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-factory+help@opensuse.org
On Wednesday 08 June 2011 22:51:27 Robert Schweikert wrote:
Hi,
Working on OpenNebula. The upstream source provides a script to start a daemon. With a couple of patches I turned the script into an init script that keeps rpmlint quiet. In the package I put the patched script into /etc/init.d.
The problem I now have is that I do not want to run the daemon as root.
Use the standard method used in all the start scripts. startproc -u <user> -g <group> /path/to/exe <arguments for program> Anders -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-factory+help@opensuse.org
participants (2)
-
Anders Johansson
-
Robert Schweikert