NTPD update linux

On RHEL/CentOS you can force ntpd to syncronize on service startup by doing the following:

# vi /etc/sysconfig/ntpd

There is an OPTIONS variable with something like:

OPTIONS=”-u ntp:ntp -p /var/run/”

Add the -x parameter:

OPTION=”-x -u ntp:ntp -p /var/run/”

You may also want to set SYNC_HWCLOCK option to “yes”, in order to also syncronize hardware clock.

Then restart the service:

# service ntpd restart

The ntp daemon will be forced to resync every time you restart the service.