How to change the time servers?

Kernels & Hardware, configuring network, installing services

How to change the time servers?

Postby duser » 2018-05-21 09:21

After clean Debian 9.4 installation external firewall started to block UDP 123 to outside world. I did not install NTP server so it must be some workstation time syncing feature.

I can't find any documentation how to change the time servers. All docs I find are about installing the time server and I do not want to do that.

How can I change the time servers after almost default installation (I added ssh and removed print server)? I must be able to use our own time server.
duser
 
Posts: 5
Joined: 2018-05-21 09:10

Re: How to change the time servers?

Postby dcihon » 2018-05-21 10:02

dcihon
 
Posts: 233
Joined: 2012-09-23 16:18

Re: How to change the time servers?

Postby None1975 » 2018-05-21 12:49

Hello. You can use systemd-timesyncd. The systemd-timesyncd service is available with systemd. To start and enable it, simply run:
Code: Select all
# timedatectl set-ntp true

To check the service status, use
Code: Select all
$ timedatectl status

Code: Select all
$ timedatectl status

Local time: Thu 2015-07-09 18:21:33 CEST
Universal time: Thu 2015-07-09 16:21:33 UTC
RTC time: Thu 2015-07-09 16:21:33
Time zone: Europe/Amsterdam (CEST, +0200)
Network time on: yes
NTP synchronized: yes
RTC in local TZ: no
OS: Debian 9.5 / WM: Xmonad
Debian Wiki | DontBreakDebian, My config files in github
Linux User #607425
User avatar
None1975
 
Posts: 654
Joined: 2015-11-29 18:23
Location: Lithuania, Vilnius

Re: How to change the time servers?

Postby duser » 2018-06-05 09:27

Thank you for information. Answer to my question seems to be editing /etc/systemd/timesyncd.conf, I'll try that.

OPTIONS
The following settings are configured in the "[Time]" section:

NTP=
A space-separated list of NTP server host names or IP addresses. During runtime this list is combined with
any per-interface NTP servers acquired from systemd-networkd.service(8). systemd-timesyncd will contact
all configured system or per-interface servers in turn until one is found that responds. This setting
defaults to an empty list.
duser
 
Posts: 5
Joined: 2018-05-21 09:10

Re: How to change the time servers?

Postby debiman » 2018-06-06 19:50

do you mean server as in a software that runs on your computer and serves something (time, assumably), or do you mean external servers that provide time to your machine, on request?
User avatar
debiman
 
Posts: 2927
Joined: 2013-03-12 07:18

Re: How to change the time servers?

Postby duser » 2018-06-07 06:56

I just wanted to sync time of my machine but from our company time servers. Editing /etc/systemd/timesyncd.conf did the trick.
duser
 
Posts: 5
Joined: 2018-05-21 09:10


Return to System configuration

Who is online

Users browsing this forum: No registered users and 13 guests

fashionable