The TLDR-Q: What is the proper / intended approach in Kali for configuring date / time synchronization?
I am not clear on the intended approach to time / date synchronization in kali given several factors, on a vanilla 2023.1 rolling kali install:
- Time and Date settings
Going into the settings in the UI, I tried to turn on date synchronization ("Keep synchronized with Internet servers"), but immediately receive the error dialog:
Screenshot 2023-03-21 at 11.54.40 AM.jpg
That didn't seem right -- I made sure ntpsec was enabled and running, ntp.conf settings and logging were configured, and then tried it again. Same problem....seems settings doesn't detect NTP.
This shows both ntp and ntpd are aliased to ntpsec, which appears to be running fine per an NTP query:Code:systemctl list-unit-files | grep ntp ntpsec-systemd-netif.path enabled enabled ntp.service alias - ntpd.service alias - ntpsec-rotate-stats.service static - ntpsec-systemd-netif.service static - ntpsec-wait.service disabled disabled ntpsec.service enabled disabled ntpsec-rotate-stats.timer enabled enabled ntpsec.timer masked enabled
Note that I also started the ntpsec-wait service and retested Time and Date settings, and received the same error.Code:$ ntpq -c sysinfo associd=0 status=0018 leap_none, sync_unspec, 1 event, no_sys_peer, system peer: 65-100-46-164.dia.static.qwest.net:123 system peer mode: client leap indicator: 00 stratum: 2 log2 precision: -24 root delay: 45.379 root dispersion: 45.446 root distance 28.26 reference ID: 65.100.46.164 reference time: e7c483ab.80c7d744 2023-03-21T19:27:39.503Z system jitter: 4.480355 clock jitter: 17.00058 clock wander: 0.0 symm. auth. delay: 0.0
- timedatectl output
I ran a simple test to see the state of system clock synchronization.
I noticed that while the clock shows as synchronized, the NTP service shows as "n/a". So I tried to start NTP and received this:Code:timedatectl Local time: Tue 2023-03-21 12:34:04 MST Universal time: Tue 2023-03-21 19:34:04 UTC RTC time: Tue 2023-03-21 19:34:04 Time zone: America/Phoenix (MST, -0700) System clock synchronized: yes NTP service: n/a RTC in local TZ: no
Code:timedatectl set-ntp true Failed to set ntp: NTP not supported
I asked really the overarching question about how to get this working at the very top of this post, but not knowing a number of things about the design intent here (and checking the kali release doc to see if there was anything mentioned there about this, and found nothing), I had a number of questions:
- Why would time synchronization not be directly configurable from the UI right out of the box -- is there some reason this is undesirable?
- What is the intended approach to getting time synchronization working in a matter consistent with the UI (or at least all parts of the system working in tandem)?
- Most of the online resources I've come across do not use ntpsec, but other packages (ntp or ntpd directly / differently). I'm assuming the intent was to leverage the existing ntpsec installation -- can someone help out how to do this?
I really appreciate any help given. While I have this question in general for any kali installation, I'm trying to define a base VM image which will be leveraged for many other cloned VMs, so it is important I get this right, or else my future redo may be multiplied. Thx again for your help!