Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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
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


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. – lcguida Dec 15 '11 at 18:25

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .