The official Ubuntu documentation has a good starter guide to Network Time Protocol (NTP) and implementing it here. Essentially you need to install ntpd (NTP daemon), which will then update your system time on a regular basis from another source, i.e. something you believe to be more reliable than your computer. Your newly-accurate server can then broadcast this correct time to all other devices on your network. To install ntpd, just use apt-get again:
sudo apt-get install ntpd
Once it’s installed, you’ll need to choose a source machine from which ntpd will take it’s timings. The NTP Project exists solely for this purpose, and has servers located around the globe which you can use. You can find the list of UK ntp.org pool servers at http://www.pool.ntp.org/zone/uk. Once you’ve selected the servers you want to use, edit /etc/ntp.conf to include the relevant host names. For the UK, this means your ntp.conf will look a bit like this:
# Specify one or more NTP servers server 0.uk.pool.ntp.org server 1.uk.pool.ntp.org server 2.uk.pool.ntp.org server 3.uk.pool.ntp.org
NUbuntugeek.com has a great page which goes into more detail about restricting access to your NTP server and checking synchronisation using the -np switch for ntpd. I’d heartily recommend the latter, just to make sure that you are actually synchronising in a valid manner, rather than syncing all your clocks to the wrong time.
Don’t forget that once you’ve done this, your machine is ready to start passing on the correct time to other boxes on your network, but you still need to tell all those boxes to look to your server for the time. On the Mac, I was able to just enter the IP of my server into the “Date and Time” control panel preferences pane, and everything worked perfectly. I haven’t got it working on the Windows box yet, but that’s less important!

No Comments