NTP Client synchronization with a Windows 2003/2008

Jonathan McKeown j.mckeown at ru.ac.za
Wed Oct 14 07:02:37 UTC 2009


On Tuesday 13 October 2009 18:44:57 Jon Radel wrote:
> Jacques Henry wrote:
> > I commented the commands involved and nothing changed... (with only 10
> > minutes of time difference)
>
> The 19 minutes between when I sent my suggestions and you responded is
> hardly enough time to see if ntpd was slewing the time.  Slewing 587
> seconds takes days.
>
> > I even tried to "force" the sync:
> >
> > U450XA0A0800650>nstop ntp
> > U450XA0A0800650>ntpd -x -n -q -c /var/ntp.conf
> > U450XA0A0800650>nstart ntp
>
> Are you sure that -x in there, telling ntpd to not step unless the
> offset is over 600 sec, doesn't override what you're trying to do with
> the -q?  How about you try simple:
>
> ntpdate the_windows_server
>
> and see what that does?  After that look in /var/log/messages.
>
> >  In fact I am still quite convinced that the MS implementation isn't
> > totally compliant with the client...
>
> Could be, but ntpq was showing that your ntpd was accepting time data
> from the Windows server at least on some level.

Alternatively, from the commandline try

ntpd -g -q -c /etc/ntp.conf

The -g flag allows ntpd to set the clock once regardless of the offset and 
the -q causes it to quit after setting the time.

In /etc/rc.conf, all you should need is

ntpd_enable="YES"
ntpd_sync_on_start="YES"

The second option adds -g to the ntpd flags, allowing it to set the clock at 
startup and continue running.

Jonathan


More information about the freebsd-questions mailing list