sys-auth/
pam-script

PAM module for running scripts during authorization, password change and session

https://github.com/jeroennijhof/pam_script/