Switch to timesyncd in Ubuntu 16.04

Tom H tomh0665 at gmail.com
Fri May 6 08:18:41 UTC 2016


On Fri, May 6, 2016 at 9:39 AM, Lukas Erlacher <erlacher at in.tum.de> wrote:
>
> I would like to remove ntpd and switch to systemd-timesyncd in Ubuntu
> 16.04. It seems that by default ntpd and ntpdate are installed and in
> use. Removing the ntp package lets timesyncd start, but it doesn't
> sync time, and journalctl tells me ntpdate was used to set the time,
> and also that ntp.service was still active - /etc/init.d/ntp still
> exists (although it belongs to ) and the ntp service is still present
> and active and tries to start ntp, which fails.
>
> So what is the correct way to remove ntpd and enable timesyncd?

You have to remove the packages that provide these executables:

localhost# cat /lib/systemd/system/systemd-timesyncd.service.d/disable-with-time-daemon.conf
[Unit]
# don't run timesyncd if we have another NTP daemon installed
ConditionFileIsExecutable=!/usr/sbin/ntpd
ConditionFileIsExecutable=!/usr/sbin/openntpd
ConditionFileIsExecutable=!/usr/sbin/chronyd
ConditionFileIsExecutable=!/usr/sbin/VBoxService




More information about the ubuntu-users mailing list