You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Operating system (e.g. Ubuntu 22.04): Ubuntu 24.04.1 LTS
Do you use selinux? (check with e.g. sestatus): No
Steps to reproduce
Connect to 2FA VPN (LDAP + Google Auth) openvpn server first time - success.
Reconnect again - Authentication failure
What I expected would happen
Users should successfully connect to OpenVPN server every time, not only first time )
What actually happened
Authentication failure second time user connects. BUT if I remove "grace_period=18000" option in my PAM config - everything works like a charm ) Users successfully connect and reconnect as many times as they need.
Ah, interesting. Because the user is in grace period, GA doesn't ask for a password. But because there's a following PAM module (pam_ldap), someone needs to ask for that password.
But pam_ldap doesn't ask for a password, because it has use_first_pass. So there's no password for it to check, and it fails.
It sounds like the right fix is for GA PAM module to ask for a password if forward_pass is provided, even if within grace period.
Could you try the ask-anyway branch I just submitted 061f4d2 to?
You can check out a branch of the code with an experimental fix for what you need:
git clone https://github.com/google/google-authenticator-libpam
cd google-authenticator-libpam
git switch ask-anyway
Then compile as normal:
./bootstrap.sh
./configure
make
And maybe make install, if you want it installed in the default location. Note that if you didn't build the current version yourself, then you may have two versions installed. Which is fine, it's just that your PAM config may now need to give the full path to the new version.
System information
Operating system (e.g. Ubuntu 22.04): Ubuntu 24.04.1 LTS
Do you use selinux? (check with e.g.
sestatus
): NoSteps to reproduce
What I expected would happen
Users should successfully connect to OpenVPN server every time, not only first time )
What actually happened
Authentication failure second time user connects. BUT if I remove "grace_period=18000" option in my PAM config - everything works like a charm ) Users successfully connect and reconnect as many times as they need.
PAM config
Paste the relevant parts of your PAM config
If SSH: SSH config
Paste the relevant parts of
/etc/ssh/sshd_config
or equivalent.If not SSH: That program's config, and logs
Contents of
/var/log/auth.log
or equivalentThe text was updated successfully, but these errors were encountered: