0

In my Linux distribution is enabled the service systemd-timesyncd. Very useful to understand how the service works is this post answer.

Below I report some system information about this service:

  • its unit file is: /lib/systemd/system/systemd-timesyncd.service
  • its configuration file is /etc/systemd/timesyncd.conf

I didn't change the default file timesyncd.conf and its content is showed below:

#  This file is part of systemd.
#
#  systemd is free software; you can redistribute it and/or modify it
#  under the terms of the GNU Lesser General Public License as published by
#  the Free Software Foundation; either version 2.1 of the License, or
#  (at your option) any later version.
#
# Entries in this file show the compile time defaults.
# You can change settings by editing this file.
# Defaults can be restored by simply deleting this file.
#
# See timesyncd.conf(5) for details.

[Time] #NTP= #FallbackNTP=time1.google.com time2.google.com time3.google.com time4.google.com #RootDistanceMaxSec=5 #PollIntervalMinSec=32 #PollIntervalMaxSec=2048

In the file timesyncd.conf the option NTP is not set:

#NTP=

Nevertheless the service is able to set the system date and, by some logs in journalctl, I have seen that the reachable NTP server could be time1.google.com.

Where is set the NTP server (probably time1.google.com) used by systemd-timesyncd?

Thanks

1 Answers1

3

From the timesyncd.conf man page.

CONFIGURATION DIRECTORIES AND PRECEDENCE
   The default configuration is defined during compilation, so a configuration file
   is only needed when it is necessary to deviate from those defaults. By default,
   the configuration file in /etc/systemd/ contains commented out entries showing the
   defaults as a guide to the administrator. This file can be edited to create local
   overrides.