I made a mistake in terminal, and now every time I use sudo, I get the error message:
sudo: unable to initialize PAM: Invalid argument
I know what I messed up, which is adding a character outside of a comment in the following file: /etc/pam.d/sudo
The contents is as follows:
x# sudo: auth account password session auth sufficient pam_tid.so auth sufficient pam_smartcard.so auth required pam_opendirectory.so account required pam_permit.so password required pam_deny.so session required pam_permit.so
What happened was that I was using nano to edit this file to add
pam_tid.so to this file so I can use touch id to bypass sudo. I then pressed Ctr+x to exit out, but missed the Ctr and didn't see the x outside of the comment. So when I try to use sudo, I get the error. The worst part is that to edit this file, I need sudo. Any help would be very much appreciated.