/var/named Changes Ownership to Root on Boot



About half of the 7 FreeBSD systems I run exhibit a very
annoying behavior that I have not pinned down yet as to why and
how to correct it.

I reboot. Soon, I find that bind isn't running. It runs
as a low-priority process and is owned by bind so it needs to
have write permission in /var/named. When I do ls -ld on
/var/named, it's owned by root.

As I said, several systems do this and several more
don't and they are all running FreeBSD6.2 except for one which
is FreeBSD5.x.

I originally used the stock /etc/rc.d start script for
named. After getting the chown surprise on a key system, I
hard-coded a 4-line script that just starts bind no matter what.
It seemed to work so I was happy even though that is not a
proper fix.

After our master DHCP server played the chown prank on
me yesterday, I added a fifth line to the hard-wire script to
chown -R bind:bind /var/named.

I guess the switcheroo happens after rc calls that
script for I still had a dead bind until I changed it back and
started it manually.

Some other systems never do the switch and my test box,
of course, is one of those so I can't fix what isn't broken. It
seems like the boxes that do this are inversely proportional to
their importance. Our master DNS did this to me this evening
after a reboot so I am asking for an explanation of what I have
done wrong to cause this to happen.

I even did a sh -x /etc/rc/named and got kind of lost in
rc.subr procedures and never saw the attempted switch of
ownership.

Thank you for any pointers to documentation that
explains this as many of the systems in question are up for a
year or more at times and we don't get to diagnose their boot
process that often. When something fails to start, it's one of
those SURPRISE!'s we'd all rather not have when in a hurry to
get key systems back running again.

Martin McCormick WB5AGZ Stillwater, OK
Systems Engineer
OSU Information Technology Department Network Operations Group
_______________________________________________
freebsd-questions@xxxxxxxxxxx mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscribe@xxxxxxxxxxx"



Relevant Pages

  • Re: error checking
    ... Using "On Error Resume Next" throughout a script masks all errors, ... each computer (no need to repeat the bind operation). ... ' Add the domain user to the local group. ... If the user object does not ...
    (microsoft.public.windows.server.scripting)
  • Re: Moving user to another container
    ... The main thing is you need to bind to the user object, objUser. ... I guess I do need your script because I still want to use the csv file. ... ' Use the Set method to specify the RPC 1779 format of the domain name. ...
    (microsoft.public.windows.server.active_directory)
  • Re: Verify existence of computer object
    ... Directory computer object prior to its re-imaging. ... The script works fine. ... If this bind fails, the user ... On Error GoTo 0 ...
    (microsoft.public.scripting.vbscript)
  • Re: /var/named Changes Ownership to Root on Boot
    ... I find that bind isn't running. ... hard-coded a 4-line script that just starts bind no matter what. ... after a reboot so I am asking for an explanation of what I have ...
    (freebsd-questions)
  • Re: Webster van Robot help
    ... Install Microsoft Script Debugger or Visual studio. ... Use a switch statement. ... the robot does in fact move. ...
    (comp.lang.javascript)