You can set the time on a linux client using NTP, using the ntpd daemon. For a quick and dirty approach you can use the deprecated ntpdate command. The following script will set the time on the pc
cat /usr/local/bin/syncclock #!/bin/bash /usr/sbin/ntpdate -s nl.pool.ntp.org /sbin/hwclock --adjust /sbin/hwclock --systohc
If you are running a Linux Client on a windows network where there is no access to a NTP server, you might want to use the samba command net time to get the time and net time set to set it. Adding the following command to the roots crontab file will set the time on your linux bot against the windows primary domain controller each afternoon.
* 12 * * * net time set > /dev/null 2>&1






