I have a home server which runs an up to date Debian 7.5 (wheezy) installation.

I just discovered that the server has its internal clock set to ± 3 minutes in the future.

I knew that I could use NTP to synchronize Debian (and the motherboard internal clock) with NTP, so I installed NTP by following the steps described in the french Debian Wiki (the English page is less detailed).

I used the following command to sync the internal clock:

ntpdate -B -q

The clock was successfully adjusted. But this is a temporary solution, so I installed the NTP daemon and added a local server in the /etc/ntp.conf file:

# pool.ntp.org maps to about 1000 low-stratum NTP servers.  Your server will
# pick a different set every time it starts up.  Please consider joining the
# pool: <http://www.pool.ntp.org/join.html>

# added

server 0.debian.pool.ntp.org iburst
server 1.debian.pool.ntp.org iburst
server 2.debian.pool.ntp.org iburst
server 3.debian.pool.ntp.org iburst

Is it the right solution? In fact I was surprised to find that the ntp daemon wasn't already installed. I'm wondering if the default installation of Debian installs a daemon to keep the internal clock synchronized. Are all the Debian installations time-shifting until their admins install ntpd?

Please tell me that the ntp daemon won't be useless because Debian has a built-in synchronization mechanism.

  • Notice that you don't need to have both ntp and ntpdate installed anymore. Previously you needed ntpdate to initially set the time or ntp wouldn't start. That is not the case anymore. See /usr/share/doc/ntp/NEWS.Debian.gz Could be good to know. – Anders Apr 30 '15 at 14:57
  • @Anders is anymore referring to the last version of Debian? – A.L May 2 '15 at 0:09
  • No, it is like that many versions of the package ago, and it is documented in the package. See /usr/share/doc/ntp/NEWS.Debian for the date. – Anders May 3 '15 at 9:10
  • And if you uses the script ntpdate-debian (or something like that) it will use the same servers as ntp. See /etc/defaults/ntpdate and /etc/defaults/ntp. – Anders May 3 '15 at 9:18

Debian expects you to install ntp yourself if you want your clock synchronized. Pretty much all you should have to do is apt-get install ntp. The default install, without any tasks, is fairly minimal.

I believe the GNOME desktop task, at least, will install it by default (as well as many other packages). Not sure if the other desktops will as well.

There isn't any other time synchronization method installed & running by default.

  • Yes, the only thing one might want to do is change the serves to something "closer" and one might serve the lan with time, so the DHCP-server might want to know this. – Anders Apr 30 '15 at 14:59

Note that with systemd apparently a different infrastructure involving timedatectl is in place (the old method still works though), see what the Arch guys write about it: https://wiki.archlinux.org/index.php/systemd-timesyncd

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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