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

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



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