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?