Samba/hwclock -- Samba Time Server Not Right
Andrew Bartlett
abartlet at pcug.org.au
Sat Jan 19 03:56:02 GMT 2002
David Rankin wrote:
>
> Andrew,
>
> Since I got your message I've dived back into my mess with Samba
> serving the wrong time. I'm pulling my hair out. Look at the following.
> It doesn't make sense to me at all : (
I've looked at the snif you sent me. Your Samba is convinced it is in
GMT. Looking a the code, this can occur if you system does't supply a
gmtime() call or your system really thinks its in GMT. It tells the
client this - the client should actually be able to say 'well i'm not
gmt, so I'll add/subtract....' but in any case we can't expect too much
of MS :-)
I'm wondering if Samba is starting before the timezone is set...
Can you kill off samba, and manually start it with 'smbd -D&& nmbd -D'
(at a root prompt).
> Ok, so what have I learned?
>
> (1) It appears to me that Samba serves time based upon the system
> clock;
> (2) Regardless of what the tz setting is, Samba is going to serve
> the 'actual' time stored in the system clock regardless of the tz info;
No, regardless of the time zone, samba thinks its in utc. Does
'gmtime()' work/exist on your system? (Write a small C proggy to
test). That failing will set GMT without the slightest mention in the
logs.
> (3) As a result/consequence of (2) above, Samba ignores the tz
> setting when serving time; and
> (4) All of you who are telling me that you have your server
> hardware clock and system clock set to UTC and are relying on the tz
> setting to have Samba serve the correct time to your windows clients ---
> I WANT TO KNOW HOW IN THE HECK YOU ARE DOING IT!!!!
>
> In the immortalized words of Tom Hanks: "That's about all I have to say
> about that."
>
> I hope this is helpful, at least somewhat thorough with regard to the
> problem I am experiencing. And I really hope that someone smarter than I
> can point out to me, diplomatically of course, where I have my "CRI."
I would rather like to get to the bottom of this some day...
Andrew Bartlett
--
Andrew Bartlett abartlet at pcug.org.au
Manager, Authentication Subsystems, Samba Team abartlet at samba.org
Student Network Administrator, Hawker College abartlet at hawkerc.net
http://samba.org http://build.samba.org http://hawkerc.net
More information about the samba
mailing list