I had to edit "sudo nano /etc/pam.d/sudo" as I was trying to setup my yubikeys to use to login. I still do not know what the problem is for that but now I cannot use sudo.
sudo: PAM authentication error: Module is unknown
sudo: a password is required
I cannot load "sudo nano /etc/pam.d/sudo" because Terminal wants my password. I was able to access "sudo nano /etc/pam.d/sudo" using "pamu2fcfg > ~/.config/Yubico/u2f_keys". That allowed my access to /etc/pam.d/sudo where I deleted the last entry I made. I followed the Yubico guide and it said to us ctrl+o to save and exit. Problem is that it does not work.
Is there any way to access /etc/pam.d/sudo in such a way that I can save my changes?
When you using the command sudo you will allways be asked for a password, you use the password you have set for your user account.
You can not save a config file without using sudo + password
You don't understand my question correctly. If I use sudo for anything, I am prompted for my account password. I will enter in my account password and I will hit enter. Then the PAM authentication error occurs.
It does not say anything at all about being unable to Log In.
It specifies inability to use sudo, just as you described. Logging in is not mentioned by any of the posts.