[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Debian Question - How to start a programm with rcS the task having root privileges



Michael Wuest wrote:
Hi there,

I did a small programm with gambas. It is there to control an LCD
panel for setting up display parameters of X11 and networking
parameters of my debian sarge distribution.

everything is fine, but the program needs root privileges to
access the LCD panel (via /dev/lcd), the networking file
"interfaces", the ifup/ifdown/ifconfig commands and so on.

Now my question is, what do I have to do to get the programm
started at boot up (with rcS???) having root privileges???

Thanks, best regards,
Michael.


Just put a link to the program in /etc/rcS.d or /etc/rc2.d, depending on when it must be executed. The name of the link must be sth like SnnLCDsetup with the value of nn controlling the execution order - lower value for nn means earlier execution.

This way your program is automatically exectuded as root.

HTH
	Heinrich



Reply to: