How to use rdate to sync my system clock

dannygoh

Verified User
Joined
Feb 9, 2004
Messages
391
Location
Malaysia
my server time is always faster that my local pc. how do i used "rdate" to sync the server time.

1. Do i need to cron the "rdate" command
2. What is the full command?
3. Do i need to open port in firewall to allow rdate?
 
Here's how we do it on RHEL:

Logged in as root:

* Create file at /etc/cron.hourly/clockset
* with these two lines only:

rdate -s time-a.nist.gov > /dev/null
hwclock --systohc > /dev/null

* chmod 700 /etc/cron.hourly/clockset

and yes, you do have to open your firewall to ntp; it's on port 123.

Jeff
 
rdate is for port 37.
NTP is for port 123.

An aside which may not apply to you. I found the answer here:

http://nscsysop.hypermart.net/rdate.html

It makes mention that some rdate servers no longer accept rdate connections. I use rdate with time.nist.gov and have never had an issue. (At least one that I've never seen.)

-drmike
 
Back
Top