# PAM notifier This bash script is triggered at each ssh connection or sudo usage. A message is send to a mattermost chatt room with a summary of the connection or the sudo command. # Installation 1. Git clone this repository 2. chown root:root pam_notify.sh 3. chmod 0700 pam_notify.sh 4. Add the mattermost url (with the incoming webhook) to the file `/etc/pam.d/hook` (without newline at the end of the file) 5. Add the following line to the `/etc/pam.d/common.session`: `session optional pam_exec.so /pam_notify.sh` 6. For debian based OS, add the line from step 5 to the `/etc/pam.d/sudo` file 7. Have fun!