Timeserver sending wrong time to Windows Clients

Andrew Bartlett abartlet at pcug.org.au
Fri Mar 23 03:42:19 GMT 2001

David Rankin wrote:
> Help Andrew! and whoever else..
> I have a Linux Mandrake 7.2 box with Samba 2.07 acting as a timeserver
> for our local lan. We are in the CST timezone. All windows boxes sync
> thier time from the Linux box via: net time \\Nemesis /set /yes. I would
> like to have xntp keep the clock on the server updated.
> Problem:
> ntpdate and xntp work great at setting the Linux box hardware clock to
> GMT.
> The problem I am having is that my windows clients do not get the right
> time no matter what I set the zoneinfo or timezone or Linux system clock
> to. It almost appears that my zoneinfo of [America/Chicago] adds 6 hours
> to GMT instead or subtracting 6 hours to get the correct local time.
> If the hwclock is set to GMT and zoneinfo is set to [no selection], the
> windows boxes get GMT. (i.e. correct time + 6 hours).
> If the hwclock is set to GMT and zoneinfo is set to [America/Chicago]
> (CST), the windows boxes get GMT + 6 (i.e. correct time + 12 hours) -
> Totally Bizarre!
> I have tried every combination of hwclock/system clock and zoneinfo
> settings available and the only way I get the windows boxes to get the
> right time is to set the hwclock to localtime (CST) and the zoneinfo to
> [no selection]. Of course this makes xntp useless because when it tries
> to update it sees a 21600 second difference in time and just pukes and
> dies!
> I have read all How-Tos and Mini How-Tos, man pages, listserve archives,
> etc and I am still at a loss. I don't understand what in the heck is
> going on. I need help figuring out how samba figures out  what time it
> serves to the windows boxes.
> I am out of ideas and dead in the water on this one -- alas with a
> feeling of defeat, I now send this question to the Linux Omniscient for
> help.
> --
> David Rankin
> Nacogdoches, Texas

First, set your hardware clock to GMT.  Ensure that all programs
accessing the hardware clock know this.  

Second, set your time-zone correctly on the server.  Check this by
running 'date'.

Samba sends the time out in localtime, as far as it can tell.  Windows
clients read the time in localtime.  But samba also looks at its
smb.conf file, and the time offset option.  Do you have this option
set?  (You should not)

Finally, grap a copy of NTPdate (I don't have a URL to hand), and
install it.  It will do pure NTP, so samba can be moved out of the

Hope this helps,
Andrew Bartlett

Andrew Bartlett
abartlet at pcug.org.au

More information about the samba mailing list