All PAM modules generate a success or failure result when called. Control flags tell PAM what do with the result. Modules can be stacked in a particular order, and the control flags determine how important the success or failure of a particular module is to the overall goal of authenticating the user to the service.
There are four predefined control flags:
required — The module result must be successful for authentication to continue. If the test fails at this point, the user is not notified until the results of all module tests that reference that interface are complete.
requisite — The module result must be successful for authentication to continue. However, if a test fails at this point, the user is notified immediately with a message reflecting the first failed
requisite module test.
sufficient — The module result is ignored if it fails. However, if the result of a module flagged
sufficient is successful
no previous modules flagged
required have failed, then no other results are required and the user is authenticated to the service.
optional — The module result is ignored. A module flagged as
optional only becomes necessary for successful authentication when no other modules reference the interface.
The order in which
required modules are called is not critical. Only the
requisite control flags cause order to become important.
A newer control flag syntax that allows for more precise control is now available for PAM.
pam.d man page, and the PAM documentation, located in the
is the version number for PAM on your system, describe this newer syntax in detail.