2-Factor authentication not working in logging screen
I have just configured in elementaryOS 0.3.2 Google Authenticator to have 2FA enabled. The instuctions followed are the following (original source: https://askubuntu.com/questions/193248/google-authenticator-for-desktop-lightdm-or-gdm-plugin).
Installation
sudo apt-get install libpam-google-authenticator
Running the app
google-authenticator
Some options configured afterwards
[...]
Added to the /etc/pam.d/login the following lines at the end to enable it.
2-Factor Authentication
auth required pam_google_authenticator.so
After doing so: Ctrl+Shift+F1
The verification code is requested as expected and works perfectly. Sweet.
I wanted however to activate this option in the login screen. Thus I added the following lines to: /etc/pam.d/lightdm and /etc/pam.d/lightdm-greeter.
2-Factor Authentication
auth required pam_google_authenticator.so
However, when trying to login and the password is requested (and properly provided), the Login screen does not request the verification code as it happens with the login and I cannot connect! Am I missing something?
NOTE: I could deactivate the pam.d configuration by login with the terminal (Ctrl+Shift+F1 again), inserting the verificatoin code for the 2FA, sudoing, and removing the added lines, but I feel that something needs to be fixed around there...
Launchpad Details: #LP1572935 Félix Brezo - 2016-04-21 10:09:53 +0000
Hi, I just tried to enable 2FA and had the same issue. Used the steps provided at https://www.techrepublic.com/article/how-to-setup-two-factor-authentication-in-linux/