Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 13 May 2005 15:35:59 +0200
From:      Michal Mertl <michal.mertl@i.cz>
To:        Benjamin Keating <motionsiren@gmail.com>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: Setting up ntpd on FreeBSD (5.4)
Message-ID:  <1115991359.1538.30.camel@genius1.i.cz>
In-Reply-To: <781e2bc005051215274e18ad18@mail.gmail.com>
References:  <781e2bc005051215274e18ad18@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Benjamin Keating wrote:
> I'm running a generic install of FreeBSD 5.4 and would like to setup
> ntpd. ntpdate doesn't do me much good as I rarely reboot, but I took
> the handbooks suggestion of using it anyway (and I've verified it
> works)). Anyway, I'm having trouble setting up ntpd and it'd be great
> if I could get your input on my steps.
> 
> I'd like for other machines on my network to talk to this one (ntpd
> server) to get the time rather then define each machine with it's own
> public ntpd servers.
> 
> 1). Add ntpd_enable="YES" to /etc/rc.conf
> 2). Create /etc/ntp.conf and (touch) /etc/ntp/ntp.drift

/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.

> 
> Permissions:
>    /etc/ntp.conf        -rw-r--r-- root:wheel
>    /etc/ntp/ntp.drift   -rw-r--r-- root:wheel
> 
> %<----- BEGIN /etc/ntp.conf -----
> restrict 192.168.1.0 mask 255.255.255.0 nomodify notrap
> 
> server clepsydra.dec.com
> server clock.fmt.he.net
> server clock.isc.org
> 
> driftfile /etc/ntp/ntp.drift
> >%----- END /etc/ntp.conf -----
> 
> I rebooted and watched my /var/log/messages and saw:
> 
> May 12 15:17:08 toki ntpd[349]: Frequency format error in /etc/ntp/ntp.drift
> 
> I did a sockstat -l and you can see ntpd is running (BTW, is there
> anyway to have it not listen to for IPv6? I only use 4 and I hate
> seeing that clutter).

I don't know. I run kernels without IPv6 so I only get a warning message
it can't bind to IPv6. Have you searched the documentation
in /usr/share/doc/ntp? After a quick search I haven't found anything but
it well may be there. Some programs don't compile IPv6 support is
NO_INET6 is defined (e.g. in /etc/make.conf) but ntp utilities' source
doesn't contain the string so this wouldn't probably help either.

> 
> What am I doing wrong? /etc/ntp/ntp.drift is writeable by root, which
> ntpd is running as... Im confused. Anyhelp would be greatly
> appreciated. Thanks
> 
> - bpk



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1115991359.1538.30.camel>