Pam_script :

Download location (HTTP):       http://freshmeat.net/projects/pam_script
Version used:                   0.1.6


Installation of pam_script


Installation is very simple. After a make command move the library to the proper directory, /lib/security.

tar -xzf pam-script-*.tar.gz
cd pam-script-*
make
mv pam_script.so /lib/security
chown root:root /lib/security/pam_script.so
chmod 755 /lib/security/pam_script.so

Pam_script.so uses some parameters. All of them are described in the README in the source directory. Important are:

common parameters



- runas=#user# : makes the script called run as user #user#

parameters only in the auth part



- onauth=/path/to/onauth/script : path to script which is run when in auth part
default is /etc/security/onauth

only in the session part


- onsessionopen=/path/to/onsessionopen/script : path to script which is run when a (valid)session is started
default is /etc/security/onsessionopen

- onsessionclose=/path/to/onsessionclose/script : path to script which is run when a session is ended
default is /etc/security/onsessionclose

After installation the more complex thing is to configure the system to make use of this module.