Hi ! I’m trying to use my Yubikey for session login and unlock session using pam_u2f.so module (in “required” mode). I will show you my conf files at the end of the message, juste let me explain my probleme first !
My probleme is : the first login (just after boot) works perfectly. However, every time I return to the login page (for any reason, like “lock-session”, “computer sleeping”, etc.), I can’t log in. D:
Here’s what I have tried to debug :
- Remove the pam_u2f.so, to be sure the probleme come from it => i can log-in again :), pam_u2f.so is the reason why i can’t log-in
- I found that link cve-details , then i tried the suggested mitigation => didn’t change anything
- i put SELinux in “permissive” mode (but the best would be to find a solution without disabling SELinux) => didn’t change anything, SELinux isn’t the problem
- i used the “nouserok” pam_u2f.so option, (nouserok = if your user don’t have a file with keys OR if there is no key for your user in the file THEN pam_u2f.so return OK
) in order to see if the module read the file. The result is, i can’t log-in => that means pam_u2f.so can read the file with the key BUT for some reason, the verification with the Yubikey don’t work (even if it work for the very first log-in)
- The single log i can have is (from
cat /var/log/secure
), this log happen when i can’t log-in in the “login window”, not the “unlock window” (i have no logs when i try to log-in using unlock window :/, maybe there is more logs somewhere) :
Mar 11 15:21:56 fedora sddm-helper[6110]: pam_kwallet5(sddm:auth): pam_kwallet5: pam_sm_authenticate
I’m out of idea and solutions, if someone can help with that problem, i would be very very happy !
here is my pam conf :
Added /etc/pam.d/u2f-required
#%PAM-1.0
auth required pam_u2f.so
Included the u2f-required
file in /etc/pam.d/kde
(for unlocking window session) and /etc/pam.d/sddm
(for the log-in window)
In both cases, i added the u2f-required
line, just after the postlogin
line
....
auth include postlogin
auth include u2f-required
...
And the key file is in standard location : /home/<USER>/.config/Yubico/u2f_keys
with the following rights (can’t be modified by the user, but he can read it) :
-rw-r--r--. 1 root root 208 10 mars 17:16 u2f_keys
If you have any questions, feel free to ask !