LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Problems with running a deamon at boot time (https://www.linuxquestions.org/questions/linux-software-2/problems-with-running-a-deamon-at-boot-time-58477/)

e0n 05-06-2003 05:44 PM

Problems with running a deamon at boot time
 
For the past few hours i've been fooling around with Undernet's ircd. I can get everything to work fine, but the problem is i cant start the deamon as a superuser. At first it didnt bother me, but now i want to start the ircd at boot and it just doesnt want to start. What i want to know is 1- why cant the ircd be started with root, 2- is there a way to change this and if there isnt, how can i make the deamon start with a different user?

Thx in advance,

-Mat


(**sorry for the duplicate post but i couldnt edit the Subject of the first post**)

redgore 05-06-2003 05:58 PM

Posting twice isnt really a good idea. I shall answer in this thread ! Some ircds cant be started as root because it is a security risk. As for your second question im not sure.

webtoe 05-06-2003 06:18 PM

is anything mentioned in the man/help pages?

It may need to be ran as a certain user, or may just need to be able to write/read/execute to certain directories.

Need more info, such as any error messages. After it attempts to start at boot, show us any relevant in your syslod (housed at /var/log/syslog but there is a 'syslog' viewer in gnome 2.2 under the system tools menu)

HTH

Alex

e0n 05-06-2003 06:23 PM

When i try to start ircd is say something like "ERROR: Cant run as super-user." then quits.

As for the logs, well /var/log/syslog doesnt exist (im using mdk9, maybe it has something to do with it), but the boot log showed me the same error i mentionned above.

redgore 05-06-2003 06:26 PM

like i said It cant be run as root because its a security risk ! for the same reason why connecting to IRC and the net as root is.

e0n 05-06-2003 06:28 PM

ok, i understand that, but what can i do to start the deamon during boot?

webtoe 05-06-2003 06:40 PM

maybe put a sudo command in there?

try looking here:

http://man.linuxquestions.org/index....ction=0&type=2

not sure if that is the right way to do this.

Have you searched www.google.co.uk/linux ?
I would of thought that people would of documented how to start it up.

Alex

Tinkster 05-06-2003 07:06 PM

Quote:

Originally posted by e0n
ok, i understand that, but what can i do to start the deamon during boot?
What I do with postgres?
Quote:

from /etc/rc.d/rc.local
/bin/su - postgres /usr/local/pgsql/bin/pg_ctl start -l /home/postgres/logfile -D /usr/local/pgsql/data > /home/postgres/start 2>&1&
You'll probably want to change the
/bin/su - postgres to /bin/su -<yourIRCDuser> :)
but you're getting the idea ;)


Cheers,
Tink

e0n 05-06-2003 07:25 PM

thanks tink, it works :D

thx all for the help.

Tinkster 05-06-2003 07:48 PM

Pleasure mate :)

Cheers, and God bless,
Tink


All times are GMT -5. The time now is 06:22 PM.