pam_script is a PAM that executes a script at the start and end of a session. Any PAM-aware application can use the module to perform arbitrary operations. It was originally written for cleaning up when a user logs out.
License: GNU General Public License (GPL)
Changes:
A bug in the dropping of privileges was fixed. The option parsing code was rewritten and an initgroups option was added.
More...