Tux

...making Linux just a little more fun!

Time Solaris sync to Windows time server

Icksan nurdian [inurdian at yahoo.com]


Mon, 21 May 2007 01:29:59 -0700 (PDT)

HI, I've already tried to sync.time solaris client to the Windows Time server, but it's always failed. but when I sync. with another solaris timer server it's succeed. What should I do..?

Thanks


Top    Back


René Pfeiffer [lynx at luchs.at]


Mon, 21 May 2007 12:13:12 +0200

On May 21, 2007 at 0129 -0700, Icksan nurdian appeared and said:

> HI, I've already tried to sync.time solaris client to the Windows Time
> server, but it's always failed. but when I sync. with another solaris
> timer server it's succeed.
> What should I do..?

I assume that you use the Network Time Protocol (NTP, see http://www.ntp.org/) in order to query the MS Windows server for its time. Unless you do not have a NTP service on the Windows machine this won't work. AFAIK the Windows Time Service can only be queried by Windows clients. I don't recall having seen a tool that can do this under Linux or Solaris.=20

Provided your network is "big enough" I'd set up a local time server and have other servers query this machine by means of NTP.

Best, René.


Top    Back


Ben Okopnik [ben at linuxgazette.net]


Mon, 21 May 2007 08:35:16 -0400

On Mon, May 21, 2007 at 12:13:12PM +0200, René Pfeiffer wrote:

> On May 21, 2007 at 0129 -0700, Icksan nurdian appeared and said:
> > HI, I've already tried to sync.time solaris client to the Windows Time
> > server, but it's always failed. but when I sync. with another solaris
> > timer server it's succeed.
> > What should I do..?
> 
> I assume that you use the Network Time Protocol (NTP, see
> http://www.ntp.org/) in order to query the MS Windows server for its
> time. Unless you do not have a NTP service on the Windows machine this
> won't work. AFAIK the Windows Time Service can only be queried by
> Windows clients. I don't recall having seen a tool that can do this
> under Linux or Solaris. 

In fact, I don't think that this is even possible - unless you come up with a way to "reverse" the whole messed-up system that Wind0ws Time Service uses. This is one of those places where Unix and Wind0ws are fundamentally incompatible: in Unix, UTC is the basis of the time system and is modified by local settings; in Wind0ws, the local time is the basis... and it results in incredibly ugly hacks (e.g., see recent discussion about changing file time stamps during the DST change in the RISKS Digest.)

> Provided your network is "big enough" I'd set up a local time server and
> have other servers query this machine by means of NTP.

Yep. Wind0ws can use NTP easily enough; Unix just can't use their version. Pretty typical.

-- 
* Ben Okopnik * Editor-in-Chief, Linux Gazette * http://LinuxGazette.NET *

Top    Back


Jimmy ORegan [joregan at gmail.com]


Mon, 21 May 2007 20:20:31 +0100

On 21/05/07, Ben Okopnik <[email protected]> wrote:

> On Mon, May 21, 2007 at 12:13:12PM +0200, René Pfeiffer wrote:
> > On May 21, 2007 at 0129 -0700, Icksan nurdian appeared and said:
> > > HI, I've already tried to sync.time solaris client to the Windows Time
> > > server, but it's always failed. but when I sync. with another solaris
> > > timer server it's succeed.
> > > What should I do..?
> >
> > I assume that you use the Network Time Protocol (NTP, see
> > http://www.ntp.org/) in order to query the MS Windows server for its
> > time. Unless you do not have a NTP service on the Windows machine this
> > won't work. AFAIK the Windows Time Service can only be queried by
> > Windows clients. I don't recall having seen a tool that can do this
> > under Linux or Solaris.
>
> In fact, I don't think that this is even possible - unless you come up
> with a way to "reverse" the whole messed-up system that Wind0ws Time
> Service uses.

Um... doesn't Samba do that?

net time set
should set the system time to that of a windows (or Samba :) server, same as it does on Windows. (Putting aside the question of whether or not it's a good idea to do so...)


Top    Back


Ben Okopnik [ben at linuxgazette.net]


Mon, 21 May 2007 15:42:17 -0400

On Mon, May 21, 2007 at 08:20:31PM +0100, Jimmy O'Regan wrote:

> On 21/05/07, Ben Okopnik <[email protected]> wrote:
> > On Mon, May 21, 2007 at 12:13:12PM +0200, René Pfeiffer wrote:
> > > On May 21, 2007 at 0129 -0700, Icksan nurdian appeared and said:
> > > > HI, I've already tried to sync.time solaris client to the Windows Time
> > > > server, but it's always failed. but when I sync. with another solaris
> > > > timer server it's succeed.
> > > > What should I do..?
> > >
> > > I assume that you use the Network Time Protocol (NTP, see
> > > http://www.ntp.org/) in order to query the MS Windows server for its
> > > time. Unless you do not have a NTP service on the Windows machine this
> > > won't work. AFAIK the Windows Time Service can only be queried by
> > > Windows clients. I don't recall having seen a tool that can do this
> > > under Linux or Solaris.
> >
> > In fact, I don't think that this is even possible - unless you come up
> > with a way to "reverse" the whole messed-up system that Wind0ws Time
> > Service uses.
> 
> Um... doesn't Samba do that?
> 
> ``
> net time set
> ''
> 
> should set the system time to that of a windows (or Samba :) server,
> same as it does on Windows. (Putting aside the question of whether or
> not it's a good idea to do so...)

I quote:

[...] unless you come up with a way to "reverse" the whole messed-up
system that Wind0ws Time Service uses.
I forgot that Samba does just that. Although it would be interesting to test if it is "properly" broken in the same exact way that Wind0ws is. :)

-- 
* Ben Okopnik * Editor-in-Chief, Linux Gazette * http://LinuxGazette.NET *

Top    Back