LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (http://www.linuxquestions.org/questions/linux-software-2/)
-   -   Automatically run root program. (http://www.linuxquestions.org/questions/linux-software-2/automatically-run-root-program-181700/)

Hammett 05-15-2004 07:04 AM

Automatically run root program.
 
Hi all!!

I have downloaded Firestarter (GUI for iptables) and i would like to get it started everytime I log in X server.
I did it creating a script under /etc/X11/gdm/Sessions, I created an entry for loading gkrellm and firestarter and then run fluxbox.
Everything works pretty good. The only "annoying" thing is that I have to give root privileges to Firestarter. Is there any solution for not having to put the password everytime i boot into X?? Some kind of script that i can put to gdm login system??

Thanks in advance

grcunningham 05-15-2004 08:43 AM

check out this link:

http://www.geocities.com/tipsforlinux/articles/028.html

it discusses setting the SUID bit so that your script can
be run as root. hope it helps

Hammett 05-15-2004 09:05 AM

@grcunningham

Thanks for the link. I followed it, and i checked UID on the firestarter executable, but in this way it just won't run. If i enter firestarter in the command line, it returns to bash, and does nothing. Doing a ps -aux does not give me the program, so it's not running at all. I don't understant why is not running.

Any other suggestion?

grcunningham 05-16-2004 07:25 AM

what are the attributes of the executable?
give me the output of ls -al
you said you had it running before, what exactly did you change?

Hammett 05-16-2004 12:45 PM

> ls -la /usr/bin/consolehelper (firestarter is a symlink)
-rwsr-xr-x 1 root root 3592 feb 25 2003 /usr/bin/consolehelper

/usr/bin/consolehelper is un red background and white font. That means something?
I did put the SUID bit with konqueror, as i don't know how to put it with console.

If SUID bit if not present, i run firestarter and it pop ups a dialog asking for root password, i put it and that's all, firestarter begins to run.

With this bit set, it won't start at all.

Thnks for helping :)


All times are GMT -5. The time now is 07:53 AM.