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

Re: [cobalt-security] RE: was Anyone else get this error? [couldn't create pid file] **SOLVED** (revised)



Does this only effect people who run DNS on their box?







From: "Matt Brown" <matt@xxxxxxxxxxxxxxxxxx>
Reply-To: cobalt-security@xxxxxxxxxxxxxxx
To: <cobalt-security@xxxxxxxxxxxxxxx>
CC: "Cobalt List" <cobalt-users@xxxxxxxxxxxxxxx>
Subject: [cobalt-security] RE: was Anyone else get this error? [couldn't create pid file] **SOLVED** (revised)
Date: Mon, 30 Dec 2002 03:32:51 -0000

Sorry to re-post, but omitted a couple of small details.

This should now be correct.

--

So here is what I did .....

(This has only been tested only on a RaQ4i and worked fine, use this info at
your own risk)

Open a SSH/Telnet session to your RaQ4i.

$ su - root
$ cd /var/run
$ rm named.pid
$ mkdir named
$ chown named.named named

# Now we have somewhere (/var/named) that user named can create his .pid
# file

# Now we would need to edit /etc/named.conf to add the line:

# pid-file "/var/run/named/named.pid"

# But because the /usr/admserv/cgi-bin/.cobalt/dns/index.cgi file re-creates
# /etc/named.conf each time a domain is added via the GUI/Admin Interface,
# the contents of /etc/named.conf get overwritten and so you are back to
# square one !

# The way to fix this is, is as so:

$ cd /usr/admserv/cgi-bin/.cobalt/dns/
$ cp index.cgi index.bak
$ vi index.cgi

# Find the following line:

my $Named_pid = '/var/run/named.pid';

# And change to:

my $Named_pid = '/var/run/named/named.pid';

# Then find the section that looks like this:

    if ($axs )
        {
        print NAMEDCONF "\tallow-transfer { $axs; };\n";
        }

# Directly under the last curly bracket, add this line:

print NAMEDCONF "\tpid-file \"/var/run/named/named.pid\";\n";

# Save and close index.cgi  ( :wq )

# Next we need to refresh the named.conf automatically the cobalt way

$ /usr/admserv/cgi-bin/.cobalt/dns/index.cgi

# If all goes well, you should see the message:

[DNS Configuration updated]

That's it, your done !

Your nameserver should have reloaded automatically, if not ....

/etc.rc.d/init.d/named reload

*N.B* Remember as with all cobalt updates (generally) they have a habit of
resetting/overwriting/updating certain files, Make backups of all files
before editing, and keep a copy safe for future cobalt overwrites so you can
add the fix back in (unless the fix fixes it).

I hope this fix helps someone else.

Regards

Matt Brown
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.434 / Virus Database: 243 - Release Date: 25/12/2002

_______________________________________________
cobalt-security mailing list
cobalt-security@xxxxxxxxxxxxxxx
http://list.cobalt.com/mailman/listinfo/cobalt-security


_________________________________________________________________
MSN 8 helps eliminate e-mail viruses. Get 3 months FREE*. http://join.msn.com/?page=features/virus&xAPID=42&PS=47575&PI=7324&DI=7474&SU= http://www.hotmail.msn.com/cgi-bin/getmsg&HL=1216hotmailtaglines_virusprotection_3mf