How can I keep a clock from a linux machine updated if this linux machine have no internet access?

The machine is in a network and others machine have internet access, but this particular one can't have.

Could I create a script to ask to another machine the correct time and put it on cron.

link|improve this question
feedback

1 Answer

up vote 5 down vote accepted

Run an NTP servers on both computers.

On a computer with Internet access, set up global servers to query like this, in /etc/ntp.conf (use servers closest to you from pool.ntp.org):

server 0.us.pool.ntp.org
server 1.us.pool.ntp.org

On a computer without Internet access, use your local server set up above, e.g. in /etc/ntp.conf use

server your.local.server.hostname

Strictly speaking, you don't have to use NTP server on a computer without Internet access, you can use something like getdate in a cron job, but NTP provides much more robust solution.

link|improve this answer
Thanks... I'll try that. – Rockskull Dec 15 '11 at 18:25
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.