Setting up ntpd on FreeBSD (5.4)

Rob spamrefuse at
Fri May 13 07:04:23 PDT 2005

Michal Mertl wrote:> 
> /etc/ntp directory isn't used by default on 5.4.
> The default location for ntp.drift file is /var/db.
> I've never created it by hand (not even by
> 'touching' it), it gets created automatically.

No, there's no such default as "/var/db/ntp.drift".
It's either "/etc/ntp.drift" or "/var/db/ntpd.drift",
depending on which of the two you consider is the
'most' default :).

There are different, hence somewhat confusing,
defaults in FreeBSD for ntpd.

"man ntpd" has this in the FILES section:

        the default name of the configuration file
        the default name of the drift file
         the default name of the key file

whereas in /etc/defaults/rc.conf, you'll find:

      ntpd_flags="-p /var/run/ \
                  -f /var/db/ntpd.drift"

Note that not only the directories differ, but
also the filenames: "ntp" vs. "ntpd".


To avoid these confusing defaults, I do following:

 In /etc/rc.conf:

 In /etc/ntp.conf:
     driftfile /var/db/ntpd.drift
     pidfile /var/run/
     [...and other config lines...]


Yahoo! Mail
Stay connected, organized, and protected. Take the tour:

More information about the freebsd-questions mailing list