Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Verification code not matching with google authenticator app on phone #226

Open
bahjat1993 opened this issue Mar 16, 2023 · 5 comments
Open

Comments

@bahjat1993
Copy link

Describe the bug

The verification code that the system is generating does not match up with the verification code that is generated on the google authenticator app. I have ensured that the google authenticator app is up to date. I use the google authenticator app on my phone for other keys and they all seem to work

To Reproduce

I simple just send the commands:
sudo apt install libpam-google-authenticator
followed by:
google-authenticator

image

The linux image i am using is ubuntu server 20.0. If you need any additional information please let me know.

@ThomasHabets
Copy link
Collaborator

ThomasHabets commented Mar 16, 2023

How about the phone, does that have the right time?

(yes I did see that it works for other keys. It's just that I think every time code doesn't match, it's been related to bad time on a device)

@ThomasHabets
Copy link
Collaborator

Oh, actually could you also confirm that the emergency codes (as seen below the QR code) work? That way you can confirm that the PAM / SSH setup is correct.

@bahjat1993
Copy link
Author

How about the phone, does that have the right time?

(yes I did see that it works for other keys. It's just that I think every time code doesn't match, it's been related to bad time on a device)

Firstly thank you for the reply.

My original thought was that the phone doesn't have the correct time. So i followed the instructions which were "Click 3 dots in the top right corner" click "seettings" click "time correction for codes" then click "sync now". I am presented with a message that states "Time already correct authenticators internal clock was not adjusted because it appears to already be in sync with google servers".

I did the above steps before posting this bug

@bahjat1993
Copy link
Author

Oh, actually could you also confirm that the emergency codes (as seen below the QR code) work? That way you can confirm that the PAM / SSH setup is correct.

I've tried doing this upon startup following these instructions link . I am presented with the option to enter verification code, i enter my emergency scratch codes. It then asks me to enter my password. I do that and it gives me an error code saying login is incorrect

@ThomasHabets
Copy link
Collaborator

Ok, if the scratch codes don't work either, then it's not about a correct clock setting.

It could be that you're running SELinux, which won't allow you to read/write stuff in your home dir, including the GA config.

What do the auth logs say?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants