Jump to content

Synchronizing Time


Agent007

Recommended Posts

hi all,Sometime back I had mentioned shutting down the NTPD daemon for security reasons and running a cron that will sync the time. Following is the procedure. Btw, u will require r00t access to configure this.

CONFIGURATION:-Put loopback address in the /etc/ntp.conf file (if this file does notexist make a new one)Entries in /etc/ntp.confserver 127.0.0.1run the follwing from the promptFirst Sync# ntpdate 137.92.140.80# ntpdate 137.92.140.80Since we want to put the sync in a crontab and not use the NTPD servicewe need to do the following# touch /usr/local/bin/ntpupdate.sh# vi /usr/local/bin/ntpupdate.shAppend the following lines in this file#First Full Syncntpdate 137.92.140.80#Second Full Syncntpdate 193.79.237.14Write and save the fileMake the file executable# chmod +x /usr/local/bin/ntpupdate.shPut Crontab entries to run it in a scheduled fashion# crontab -eappend the following30 9 * * * /usr/local/bin/ntpupdate.shwrite and save the file The above will sync time everyday at 9:30 amwith the above public ntp servers
PS:- IP Address 192.79.237.14 and 137.92.140.80 are public NTP servers
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...