Hi,
I think there was something wrong with the timing.
My server time was set to UTC. The region is set to Singapore.
In WordPress, I had also set the region to +8 UTC for Singapore I think.
But somehow, the timing seems off.
It may be a Ubuntu bug. Or I may have missed a setting. But no worries. I tried the google authenticator plugin and that worked for me with no adjustment to ubuntu or WordPress. So for that I am grateful.