PAM (Pluggable Authentication Modules)
Translation of the original in Catalan. Read it in: CatalàCastellano
With the four notes I attach in this article the aim is to have a guide in order to be able to follow and understand the configuration files associated with PAM.
When PAM is associated with a service it has a configuration file inside
/etc/pam.d
often with the same name as the service or something that reminds us of it. Inside each of these files four categories are defined for the authentication process:
- auth - authentication
- account - access management
- password - when and how the password can be changed
- session - user configuration environment, access to their profile
It is not mandatory to define the four categories for all services, there are services that with the auth category have enough. Or others that require all of them. PAM has a selection of different models for each category that are organised in a stack. Each module is labelled with what is called a control flag. It is through these tools that the administrator controls the authentication process of the users over the services.
The control flags supported by PAM are:
- required
- requisite
- sufficient
- optional
If a module marked with required, requisite or sufficient responds negatively the execution of the stack stops immediately. If the response is positive in a module: required, requisite or optional then PAM will continue examining the rest of the modules. If a sufficient module responds positively the response to the whole category being examined is considered positive.