Wait, is this why my arbitrary changes to /etc/pam.d on Ubuntu have resulted in failure?
Maybe! Rewriting PAM is usually only done when messing with packages but can be called manually if you drop files in there with your config management.
“Wow this could be really useful” you might think. “Where “is it documented?”
https://wiki.ubuntu.com/PAMConfigFrameworkSpec
“But where is the reference, how do I know what directives are even available?”
…
Re:The Surreal Horror of Pam
by notacoward on Tuesday November 09, 2021 @09:30PM
(#29170409)
This is the part that really gets me about PAM. There really did need to be something where it sits, and the plugin approach is perfectly sound. (Aside: I hope the expressed horror at "plugins in C" is one of the satirical parts, because plenty of people really do have such a poor grasp of computing history.) On the other hand, the implementation of those basic ideas has always been plagued by inscrutable APIs/formats, poor documentation, and unnecessarily catastrophic failure modes - as shown in the talk itself, and some of the comments above. Actually working with PAM is almost as unpleasant as working with SELinux, and neither has to be so bad.
You can always take control back. I have a fair few Ubuntus lying around whilst I use Arch on my laptop and workstations.
Ubuntu has /etc/pam.d/common-auth which looks like the main module to define your intent. Strip out the comments and see what you have left - read the comments first! Copy the whole lot somewhere and login to another console with root rights. Now you can play.
What would you like to do?
Re:The Surreal Horror of Pam
by naleshniki on Wednesday November 10, 2021 @07:34AM
(#29173949)
It's important to be aware that this goto nonsense is not PAM. It's not in Solaris PAM nor in OpenPAM (the BSD's PAM, as used in macOS, FreeBSD, NetBSD, and DragonFly BSD.)
Inventing bizarre and unusual turing complete configuration languages is a GNU/Linux hobby - just look at UDev reals.
Re:The Surreal Horror of Pam
by throwawayboise on Tuesday November 09, 2021 @11:03PM
(#29170943)
> both ended up saying to never ever touch anything in /etc/pam.d
As I've learned the hard way, at least keep a root shell open somewhere if you do...
This led Ubuntu to create /usr/share/pam-configs which have files like
to try and make something declarative. RHEL/CentOS went the authconfig route but both ended up saying to never ever touch anything in /etc/pam.d