Score:0

TOTP OTP timesync linux RTC

wf flag
t09

TOTP ((T)ime-based (O)ne-(T)ime (P)assword. is not working for any site that requires it, tried all major browsers, chrome, chormium, firefox. How to fix ?

Completed Troubleshooting:

  1.  $ timedatectl status                               
            Local time: Tue 2022-10-25 14:29:32 +08
        Universal time: Tue 2022-10-25 06:29:32 UTC
              RTC time: Tue 2022-10-25 06:29:32
             Time zone: Asia/Singapore (+08, +0800)
      System clock synchronized: no
           NTP service: n/a
       RTC in local TZ: no .
    

2. - $ timedatectl set-local-rtc 1 --adjust-system-clock
- $ sudo timedatectl set-local-rtc 1
  1.  $ timedatectl status                               
                Local time: Mon 2022-10-24 22:40:03 +08
            Universal time: Mon 2022-10-24 14:40:03 UTC
                  RTC time: Mon 2022-10-24 22:40:04
                 Time zone: Asia/Singapore (+08, +0800)
     System clock synchronized: no
                   NTP service: n/a
               RTC in local TZ: yes
    
     Warning: The system is configured to read the RTC time in the local time zone.
              This mode cannot be fully supported. It will create various problems
              with time zone changes and daylight saving time adjustments. The RTC
              time is never updated, it relies on external facilities to maintain it.
              If at all possible, use RTC in UTC by calling
              'timedatectl set-local-rtc 0'.
    
  2. $ sudo timedatectl set-local-rtc 0
    $ timedatectl set-local-rtc 0 --adjust-system-clock

  3.      $ timedatectl status                          
                Local time: Mon 2022-10-24 22:50:04 +08
            Universal time: Mon 2022-10-24 14:50:04 UTC
                  RTC time: Mon 2022-10-24 14:50:04
                 Time zone: Asia/Singapore (+08, +0800)
     System clock synchronized: no
               NTP service: n/a
           RTC in local TZ: no
    

After each command cleared cache on each browser and restarted browser and tested - problem persists. Suspect TOTP and OTP access system clock and operating system clock. That would likely cause 'System clock synchronized: no' to render TOTP incorrect. If TOTP does infact access system clock then how to change system clock so TOTP is correct ? What additional steps should be taken to find where os is reporting/collecting incorrect data to share with totp ?

This problem has been replicated on debian 10 and kali2019+2020. The only replicable solution has been full reinstall of os (reversion to earlier cloned copies of os prior to problem)

Martin avatar
kz flag
The only thing you have changed with `set-local-rtc` is to set your hardware clock to your local time vs UTC time, but you have not faced the problem, that you do not have a timesync service running. For a start, try `systemctl start systemd-timesyncd`. Second, you usually can configure the maximum allowed time skew for the synchronization phase (usually in multiples of 30s). Try increasing this value...
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.