1

I just got a Yubikey and tried to set it up to use it to login to my computer.

I followed the instructions by hackerb9 in this post. Passwordless login with Yubikey 5 NFC

It worked perfectly, but I didn't like that I had to use the key for my sudo commands as well so I deleted /etc/pam.d/common-u2f, thinking it would revert the changes I had made.

However, after that my sudo is broken, I get the following error: sudo: unable to initialize PAM: Critical error - immediate abort

I also cannot create the file again as it is in the /etc/ folder.

Can I do something to fix this?

1 Answers1

0

I fixed it by booting into recovery mode and using the root shell prompt.

I than added back /etc/pam.d/common-u2f and added the line auth sufficient pam_u2f.so authfile=/etc/u2f_mappings cue.