Time Syncronization, Samba, Windows, and the rest of the world

Dustin Decker dustind at moon-lite.com
Thu Feb 6 14:18:27 CST 2003


On Wed, 5 Feb 2003, Jonathan Hutchins wrote:

> Quoting numa at thenuma.com:
> 
> > Well... actually I use my Samba PDC to sync my win-boxen at work.  At home
> > I use my VPN to the office to sync to Samba PDC.  Kris
> 
> So what's your technique?  What do you run on the individual workstations to 
> accomplish time sync?  Manual "net time /domain:domain /set /y"?

Depends on which version of Windows you're on.  

In the NT 4.0 world I use "net time /set /y" in a logon script.  This will
syncronize the workstation clock to that of the PDC.  (The /domain flag is
optional, to sync with a domain you aren't a member of.)  I make sure 
things are syncronized during logon, and hope they stay that way for the 
day.

On the PDC, I make use of public domain NIST software available at: 
http://www.boulder.nist.gov/timefreq/service/its.htm
It can be scheduled quite easily within their program.

On Win2K, you have two options readily available.  All workstations will 
attempt to syncronize to a domain controller upon logon out of the box.  
The domain controllers can be told to query an NTP time server via 
"net time /setsntp:timeserver" where timeserver is your preferred time 
source such as time-a.nist.gov.  (Bear in mind, you need only do this on 
the root forest PDC emulator FSMO, all other domain controllers will 
follow it's lead.)  In those instances where Win2K or WinXP are being used 
without a domain, this can be set on each workstation if desired.  (You 
can also click & drool it via the control panel.)  This creates more 
outbound traffic on your Internet segment, but the queries aren't really 
large.

I expect samba, when emulating a domain controller, properly doles out 
time to all clients that ask for it.  On the samba server, you can do 
something in a script like:

#!/bin/sh
/usr/sbin/ntpdate -bu -t 3 time-a.nist.gov >/dev/null 2>&1
/sbin/hwclock --systohc >/dev/null 2>&1

I drop a link in cron.hourly or cron.daily depending on how much clock 
drift the machine tends to experience.

Dustin
-- 
*-----------------------------------*
| Dustin Decker                     |
| dustind at moon-lite.com       *-----------------------------------------*
| http://www.dustindecker.com |                                         |
| Moon-Lite Computing         | "Democracy is two wolves and a lamb     |
| 913.579.7117                |  voting on what to have for lunch.      |
*-----------------------------|  Liberty is a well-armed lamb contesting|
                              |  the vote."                             |
                              |		-- Benjamin Franklin, 1759      |
                              *-----------------------------------------*




More information about the Kclug mailing list