Summary: | sys-auth/google-authenticator-1.09 no longer works if included at the end of the sshd pam config | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Adrian <adrian> |
Component: | Current packages | Assignee: | tea <tea+gentoo> |
Status: | RESOLVED WORKSFORME | ||
Severity: | normal | CC: | adrian, candrews, proxy-maint, sam, zlogene |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- |
Description
Adrian
2020-10-14 22:37:42 UTC
CC'ing the sys-auth/pambase maintainers (that package owns /etc/pam.d/system-auth) without proper failure logs it is nothing to say here, please provide the journalctl -f output (pr any other equiv information) of what happening, I can only guess, but I am not a forecast show host :) There are no useful logs (even with USE=debug for pam). However, we had an interesting discussion in #gentoo yesterday, and it looks like the "auth sufficient" line accepts the login so the "auth required pam_google_authenticator.so" line coming later is never considered. (In reply to Adrian from comment #0) > auth sufficient pam_unix.so nullok try_first_pass > auth [default=die] pam_faillock.so authfail Just replace by: > auth [default=ignore] pam_faillock.so authfail as Mikle suggested in bug 748405, comment 13. Checking pam_unix at this place is not needed, as checking of credentials was already done in the (old) lines before. And with 'sufficient' it stops any further processing if pam_unix succeeds. If processing continues to the next line, [default=die] always stops processing and fails login (even if other pam-modules verified credentials before, like in the mentioned bug). With [default=ignore] it keeps processing in any case. This will lead to faillock registering a failed login, even if it is successful. But this is fine, as on success it is cleared again some lines below: > account required pam_faillock.so Yeah, pam_google_authenticator must go before pam_unix (sufficient). |