System Administration
cancel
Showing results for 
Search instead for 
Did you mean: 

how to sync with windows server 2003 NTP server

 
SOLVED
Go to solution
Kelvin Ng
Advisor

how to sync with windows server 2003 NTP server

Hi, i have a production server running 11.00. how to set it to sync with windows server 2003 NTP server?
10 REPLIES
Johnson Punniyalingam
Honored Contributor
Solution

Re: how to sync with windows server 2003 NTP server

ntpdate

man ntpdate
Problems are common to all, but attitude makes the difference
Viktor Balogh
Honored Contributor

Re: how to sync with windows server 2003 NTP server

for setting it permanent, you should give in the ip address of the windows ntp server to /etc/ntp.conf

# ntp.conf
driftfile /etc/xntp.drift
logfile /var/adm/syslog/xntpd.log

server ip-of-win-ntp-server
server ip-of-backup-ntp-server
#
****
Unix operates with beer.
Kelvin Ng
Advisor

Re: how to sync with windows server 2003 NTP server

Hi, sorry for late reply just got downtime for the server. after i set below under ntp.conf;

# ntp.conf
driftfile /etc/xntp.drift
logfile /var/adm/syslog/xntpd.log

server 128.1.x.x
#

date still didn't changed although restart server, there is no xntpd.log file created. i run ntpdate 128.1.x.x finally date changed.

just wonder how to check whether ntp.conf is working?

anywhere, guys, thanks a lot for the helps

James R. Ferguson
Acclaimed Contributor

Re: how to sync with windows server 2003 NTP server

Hi Kelvin:

> date still didn't changed although restart server, there is no xntpd.log file created. i run ntpdate 128.1.x.x finally date changed.

To set your server's time in a single step during startup, modify '/etc/rc.config.d/netdaemons'. Set the 'NTPDATE_SERVER' to the name of your time source and set 'XNTPD=1'.

> just wonder how to check whether ntp.conf is working?

Use:

# ntpq -p

This will show you if time synchronization has occurred and with who, among other things. Read more here:

http://www.docs.hp.com/en/B2355-90147/ch07.html

Regards!

...JRF...
Bill Hassell
Honored Contributor

Re: how to sync with windows server 2003 NTP server

ntpq -p is the most important tool before starting to configure NTP. ntpq is a query program and will test the ability to communicate using port 123 to the Windows box. Start by querying the remote windows server:

ntpq -p 128.1.x.x

This has to work before trying anything else. There is no logfile line in ntp.conf so remove it and just have the two server lines and driftfile. The logfile directive doesn't exist in the xntpd documentation (only the -l option on the command line). Be sure to edit /etc/rc.config.d/netdaemons so NTP will start automatically. You can add the -l option in netdaemons like this:

export XNTPD_ARGS="-l /var/adm/ntp.log"


Bill Hassell, sysadmin
Viktor Balogh
Honored Contributor

Re: how to sync with windows server 2003 NTP server

oops, Bill you're right, it just remained in our config (I think the last sysadmin has confused the *nix distros)

checked, the logfile is there but empty:

# ll /var/adm/syslog/xntpd.log
-rw-r--r-- 1 root sys 0 Nov 28 23:59 /var/adm/syslog/xntpd.log

****
Unix operates with beer.
Kelvin Ng
Advisor

Re: how to sync with windows server 2003 NTP server

Hi James & Bill,
thanks for the info.
i tested with ntpq -p 128.1.xx resulting request time out, i will get my network guy to open port 123, after then should be alright.
btw, do i need to restart the production server after everything being set?
what is the time internal for sync to take place?
James R. Ferguson
Acclaimed Contributor

Re: how to sync with windows server 2003 NTP server

Hi (again) Kelvin:

> do i need to restart the production server after everything being set?

You can simply do:

# /sbin/init.d/xntpd stop
# /sbin/init.d/xntpd start

> what is the time internal for sync to take place?

Synchronization should occur within a few minutes.

Regards!

...JRF...
Kelvin Ng
Advisor

Re: how to sync with windows server 2003 NTP server

thanks again James.
Bill Hassell
Honored Contributor

Re: how to sync with windows server 2003 NTP server

As long as the current time is within a few minutes, xntdp will slowly adjust the time. HOWEVER, using the start/stop script will 'jump' the time. Be careful not to use the start/stop script when a database or other time-critical applications are running. You can stop and start xntpd with the command line: kill (pid of xntpd) and just start xntpd (with the -l option). Starting xntpd this way will not jump the time. Always check the xntpd log for status messages.


Bill Hassell, sysadmin