Google
 
 
Home arrow FreeBSD Articles arrow Use NTP to synchronize your clock

Main Menu
 Home
 Linux Articles
 FreeBSD Articles
 Apache Articles
 Perl Articles
 Other Articles
 Program Downloads
 Free Books
 News
 The Web Links
 Contact Us

Most Read
Automating SFTP using expect
FreeBSD PPTP VPN
Shorewall Router on Linux
SnortShorwall - Using Snort And Shorewall Together
Shorewall Stand Alone Firewall

Polls
Favorite Linux/BSD
Fedora
Mandrake
Debian
Slackware
Gentoo
Suse
FreeBSD
Other
  

Syndicate
Latest news direct to your desktop
RSS

Login Form
Username

Password

Remember me
Forgotten your password?
No account yet? Create one

Members Online
 Linux-BSD-Central Has a Total of 701 Members   Members (701) # Online
 We have 5 Guests Online. Guests 5
 We have 0 Users Online. Users 0

Online Users
No Users Online

Statistics
OS: Linux w
PHP: 5.2.9
MySQL: 5.0.91-community
Time: 14:53
Members: 701
Hits: 1324417
News: 277
WebLinks: 15



-->

Use NTP to synchronize your clock   PDF  Print  E-mail 
Contributed by Chad Brandt  
Monday, 13 September 2004
On FreeBSD you can use ntptimeset to synchronize your clock. This short article will explain how to configure ntptimeset and show how to set up a cron job to automatically adjust your time. ntptimeset is installed by default on FreeBSD but here are the steps to configure it.

1. First we have to create the configuration file. In /etc create a file called ntp.conf.  This is the file that you define what servers will be used to sync your time

[root]# cd /etc
[root]# vi ntp.conf

The file should look like this

server 192.5.41.41 prefer
server 128.4.1.2
server 138.39.7.20
server 128.4.1.1
server 128.227.205.3

driftfile /var/db/ntp.drift


2. Setup a cron job to run the command each day

[root]# contab -e

This will open up your cron editor in vi. Add a line like this:

10       18      *       *       *      /usr/sbin/ntptimeset -s

This will run ntptimeset at 6:10 pm every day. The -s parameter tells ntptimeset to go ahead and set the time


Comments

Write Comment
Name:Guest
Title:
BBCode:Web AddressEmail AddressBold TextItalic TextUnderlined TextQuoteCodeOpen ListList ItemClose List
Comment:



Powered by AkoComment 1.0 beta 2!




 
Google Ads



 

Check out TwistByte - The best mobile apps available For awesome Android and IPhone applications!!