[Solved!] Time Drift Ubuntu 22 : System clock synchronized: no

Problem: Two Factor Authentication Not in sync

While setting 2FA on an Ubuntu 22 server for WordPress, I had noticed that the 2FA app’s code would not sync with the code on my Authenticator App. Finding this odd, I went to CLI of the server and ran timedatectl

Output:

ubuntu@user:~$ timedatectl
Local time: Sat 2023-01-07 08:02:40 EST
Universal time: Sat 2023-01-07 13:02:40 UTC
RTC time: Sat 2023-01-07 13:02:40
Time zone: America/New_York (EST, -0500)
System clock synchronized: no
NTP service: active
RTC in local TZ: no

Figuring that the reason I was having issues with the Authenticator app was due to a time drift. Why was my server’s time about 30 seconds in deviation from NPT?

To solve the “System clock synchronized: no

sudo systemctl unmask systemd-timesyncd
sudo apt install systemd-timesyncd
sudo systemctl enable systemd-timesyncd.service
sudo systemctl start systemd-timesyncd.service

Now I ran timedatectl again, and now “System clock synchronized: yes“.

Refreshing the 2FA on CMS app now showed the same values as the Authenticator app. Problem Solved!

A very rare event. Did anyone see a Delorean?

Lead~Robot