Re:Pluggable Authentication Modules (PAM)
by hackeraccount on Saturday February 04, 2023 @12:23PM
(#34656150)
My one rule about PAM is always have an ssh session going when you mess with it and never drop it until you've tested logins 7 ways to Sunday. I remember one time making a seemingly minor change - testing it; huzzah! logins still work - dropping the connection and much much later realizing that you didn't need any password to login. Oops.
[ Parent
| on HN ]
Re:Pluggable Authentication Modules (PAM)
by towawy on Saturday February 04, 2023 @01:16PM
(#34656642)
I made a similar learning when messing with PAM to enable TouchID with sudo on a Mac!
Edited the config with "sudo nano /etc/pam.d/sudo", a typo slipped in, saved the file and closed nano. After that sudo was broken and I had to go down the rabbit hole of changing a root owned system file without sudo to fix it.
The next time I opened a root shell with "sudo -s" and THEN opened nano. Made absolutely sure sudo still works in a new Terminal window before closing anything.