PAM-Modules |
|
A Collection of Modules for PAM |
Sergey Poznyakoff |
The module pam_regex
is a general-purpose tool for
authentication using regular expressions. You can use it, for
example, to allow or deny access depending on whether the user name
matches a given regular expression. Another possible use is to
modify user names following a predefined pattern (as in
sed
), to supply modules that follow it in the PAM
stack with a normalized user name.
As a quick start example, the following pam.conf entry forbids access for any user names that look like email addresses:
httpd auth required pam_regex.so sense=deny regex=.*@.*
Here, the argument regex supplies a regular expression to match against, and sense=deny states that any name matching this expression must be denied.
This document was generated on August 11, 2021 using makeinfo.
Verbatim copying and distribution of this entire article is permitted in any medium, provided this notice is preserved.