Blog: How to force NTP sync in Red Hat Linux

So maybe you've done this before...you tell your Red Hat server to use Network Time Protocol..hit Apply and wait expectantly. And then you wait some more and then you just decide that the time being off by 8 hours and 32 minutes is "ok". Here's how you force the sync:

#vi /etc/sysconfig/ntpd

At the top of the file there will be an OPTIONS variable with something like

OPTIONS="-u ntp:ntp -p /var/run/ntpd.pid"

Modify it and add the -x parameter:

OPTION="-x -u ntp:ntp -p /var/run/ntpd.pid"

Then restart the service:

#service ntpd restart

This will force the ntp daemon to resync every time you restart the service. You can either leave the -x in there permanently or just add it when you need it.

Blog Index