Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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.

share|improve this question
add comment

1 Answer 1

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.

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

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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