[Samba] synchronise time

Chris smb23 at realcomputerguy.com
Tue Oct 11 15:49:47 GMT 2005

On Tuesday 11 October 2005 09:30 am, Josh Kelley wrote:
> Why not use NTP instead?

Agreed. Simplest and best.

> Windows supports NTP (the Windows Time  
> Service), and http://msi-repository.sourceforge.net/ has "NTP for
> Windows" MSI's that make using it easy.  (I haven't tried these to
> know how they work.)

Windows 2k/XP/2k3 support SNTP via the Windows Time Service which, 
although not NTP caliber, can nevertheless sync with an NTP server. No 
reason to download and install anything to sync these clients. Just 
make sure the Windows Time Service is running, set to automatic, and 
pointing to a valid NTP or SNTP server.

Most XP systems I've seen are as a default, automatically syncing to a 
Microsoft time server. Generally I change this to access the local NTP 
server on the server running Samba (I deal generally with small 
business networks so there usually aren't a lot of single purpose 
servers plus NTP is already needed on the server to keep its time 

The logon script always checks to see what type of system it is:
	if "%OS%"=="Windows_NT"
So it only runs:
	net time /set /yes
for the non-NT (Win9x/ME) systems, which sync time at logon via Samba. 
Everything else syncs regularly via (S)NTP with no need to change 
permissions, etc.

The one quirk I have noticed in the past (maybe it has been fixed by now 
but I haven't checked) is that when setting MS's SNTP to sync with an 
NTP server the IP address instead of the system name was necessary.

The details can be seen via:
	net time ?
To check the setting:
	net time /querysntp
To set the server (if is the listening NTP srv):
	net time /setsntp:


More information about the samba mailing list