I have set up 2 factor authentication. I had added the following line to the end of /etc/pam.d/common-auth:

auth required pam_google_authenticator.so

All was working well, except for the fact that I did not get prompted for a verification code. According to this tutorial the line should be added above:

auth    [success=1 default=ignore]      pam_unix.so nullok_secure

I misread and put it beneath this line. After logging out I tried to login but now my password was no longer working. I got the error message that my password was incorrect. I am 100% sure the password is correct as I have used it many times every day. My change in the common-auth file must have corrupted the login.

Is there any way to rollback this change? I am working on a dual-boot machine and have windows installed as well. Maybe I could use the windows install to access the common-auth file and change it?


Restart ubuntu in recovery mode. Select option 'run command line as root'. And revert changes to common-auth file.

I'm glad it helped me out, but I guess at the same time this is a huge security vulnerability as 2fa (or worse) can be disabled by anyone at any time.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.