By default Ubuntu ships with an ifup script that starts ntpdate in service mode. Not sure why, but in my experience this script often does not work – at least it did not keep the time in sync on any of my machines.

On non-Ubuntu Debian installations I enable time synchronization by just installing the ntp package:

I don’t have to do anything else. Just install this package.

Not with Ubuntu: When installing this package, the NTP daemon tries to start, but is not able to, because the ntpdate process from the ifup script is still running and blocking some ports.

The ntpdate package and its ifup script are part of the ubuntu-minimal package and with this part of every ubuntu installation. Because of this I don’t want to remove them. Furthermore the script can’t be deactivated by configuration, but today I found a way to effectively disable it: The -q option!

The solution

So, if you really want to enable NTP synchronization on Ubuntu, edit the file /etc/default/ntpdate and set NTPOPTIONS to the following:

Then install the ntp package:

and enjoy date synchronization as you expect it.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">