PAM-SCRIPT(8)
π NAME
okay so bestie, <pink>pam-script</pink> is a PAM module that can invoke scripts within the PAM stack β¨ β that's it, that's the whole vibe.
πΈ SYNOPSIS
pam-script.so [onerr=(success|fail)][dir=/some/path/]
π¦ DESCRIPTION
pam-script lets you execute scripts during authorization, passwd changes, and on session opening or closing. literally so many moments π
Those scripts can do the necessary tasks or influence the outcome of the PAM stack β highkey powerful. For example, if the following entry was included in pam.conf:
sshd auth required pam_script
then if the script, pam_script_auth, exits with a non-zero value, this would cause the user to be denied SSH access to the machine. π no SSH for them, it's giving locked out.
β¨ OPTIONS β¨
a summary of options is included below π«Ά
onerr=(success|fail)β the default behavior if the module can not find or execute the script. The default is to fail if the option is not given. π«‘dir=/some/path/β where to find the pam-scripts to invoke for each of the various module-types as described below. The default isdir=/etcif not given.
π List of scripts
pam_script_authβ executed underauthwhich handles the authentication stage of establishing the user via some challenge-response (i.e. username/password).pam_script_acctβ invoked under theaccountmodule-type for non-authentication based account management.pam_script_passwdβ invoked underpasswdfor changing the password tokens.pam_script_ses_openβ invoked when a session is first opened.pam_script_ses_closeβ run after a session is first closed.
All the scripts will be passed several environment variables: PAM_USER, PAM_RUSER, PAM_RHOST, PAM_SERVICE, PAM_AUTHTOK, PAM_TTY, and PAM_TYPE referring to the module-type. π₯ and the pam_script.so arguments in the pam.conf will be passed on the command line, which can be used to modify the script behavior. iykyk.
π FILES
/usr/lib64/security/pam_script.soβ the PAM module/etcβ where the scripts should be placed by default
β VERSION
pam-script 1.1.8 π
π SEE ALSO
PAM(8) and the PAM "The System Administrators' Guide"
π AUTHOR
pam-script was written by Jeroen Nijhof <jeroen@jeroennijhof.nl> with some additions and modifications by R.K. Owen, Ph.D. <rkowen@nersc.gov>.
This manual page was written by R.K. Owen <rkowen@nersc.gov>, for the Debian project (but may be used by others).
k so that's the whole page fr fr π it's from the Linux-PAM Manual, dated August 22, 2007 β vintage but iconic π slay, go write some scripts bestie ππ¦
π¦ where this page comes from
- opensuse-leap 16.0: pam_script 1.1.9-bp160.1.10 Β· GPL-2.0-or-later
- opensuse-leap 16.0: pam_script 1.1.9-bp160.1.10 Β· GPL-2.0-or-later
- opensuse-leap 16.0: pam_script 1.1.9-bp160.1.10 Β· GPL-2.0-or-later
- opensuse-leap 16.0: pam_script 1.1.9-bp160.1.10 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms