Using Win2003 R2 Domain Controller as NTP Server for Suse 11

Hi,

I’ve just setup my first virtual OpenSuse v11.2 64Bit (Gnome) OS and I am wondering as I am not using any Linux’es /UNIX’es in my env yet if I can use my existing Windows 2003 Domain Controller as NTP Server and my OpenSuse as NTP client?

However if I try to use the “sntp” command I get ther following error message:

suse11:~ # sntp -V 192.168.13.xyz
sntp options: a=1 v=2 e=0.100 E=5.000 P=30.000
d=15 c=5 x=0 op=1 l= f= 192.168.13.137
sntp: offset=0.688+/-0.001 disp=10.617
sntp: unable to format current local time
sntp: Success

It tells me succes but I am not really convinced of it:

suse11:~ # rcntp ntptimeset
. . . . . . . . . . no server reached

hmmm…

suse11:~ # cat /etc/ntp.conf
################################################################################

/etc/ntp.conf

Sample NTP configuration file.

See package ‘ntp-doc’ for documentation, Mini-HOWTO and FAQ.

Copyright (c) 1998 S.u.S.E. GmbH Fuerth, Germany.

Author: Michael Andres, <ma@suse.de>

Michael Skibbe, <mskibbe@suse.de>

################################################################################

Radio and modem clocks by convention have addresses in the

form 127.127.t.u, where t is the clock type and u is a unit

number in the range 0-3.

Most of these clocks require support in the form of a

serial port or special bus peripheral. The particular

device is normally specified by adding a soft link

/dev/device-u to the particular hardware device involved,

where u correspond to the unit number above.

Generic DCF77 clock on serial port (Conrad DCF77)

Address: 127.127.8.u

Serial Port: /dev/refclock-u

(create soft link /dev/refclock-0 to the particular ttyS?)

server 127.127.8.0 mode 5 prefer

Undisciplined Local Clock. This is a fake driver intended for backup

and when no outside source of synchronized time is available.

server 192.168.13.xyz

server 127.127.1.0 # local clock (LCL)

fudge 127.127.1.0 stratum 10 # LCL is unsynchronized

Add external Servers using

# rcntp addserver <yourserver>

Miscellaneous stuff

driftfile /var/lib/ntp/drift/ntp.drift # path for drift file

logfile /var/log/ntp # alternate log file

logconfig =syncstatus + sysevents

logconfig =all

statsdir /tmp/ # directory for statistics files

filegen peerstats file peerstats type day enable

filegen loopstats file loopstats type day enable

filegen clockstats file clockstats type day enable

Authentication stuff

keys /etc/ntp.keys # path for keys file
trustedkey 1 # define trusted keys
requestkey 1 # key (7) for accessing server variables

controlkey 15 # key (6) for accessing server variables

I just setup a CentOS v5.4 server within the same Subnet as the Windows 2003 R2 (NTP) Server and the OpenSuse 11.2 VM and here the “sntp” command works fine…

Seems like an issue with OpenSuse…

“Works fine here”, vs 2k3+2k8.

Well, you might be on to something - I tested by changing to local time instead of UTC and indeed I can replicate your error - it seems to have a bug in formatting the time if the system is set to local time and ntp is used against a Windows server.

However, ntp syncing vs other unix boxes or pool.ntp.org does not result in an error in either case.

How can I change from local time to UTC? Via “date” command?

YAST / Date & Time -> Hardware Clock set to UTC.

Then try once;
sntp -P no -r pool.ntp.org

Then try to sntp your Win2k3 server.

Hmm… I have only SSH access to the console… and tunneling of Gnome won’t work via Internet…

Could get access to the VMWare ESX Server GUI but need admin user&pw therefore…

Should also work via CLI… will Google for it…

Well you don’t need to actually do it - I will report this in Bugzilla and let’s see if they can roll out a bix for it.

Thanks for letting us know.

So now I checked(I’ve gotten YAST access) the date&time settings and UTC was enabled!?

Now I tried it with localtime “/etc/sysconfig/clock” > HWCLOCK="–localtime" but also doesn’t work for me…