You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

notify-pam.sh 314B

123456789101112
  1. #! /usr/bin/env sh
  2. [ "$PAM_TYPE" = "open_session" ] || exit 0
  3. {
  4. echo "User: $PAM_USER"
  5. echo "Ruser: $PAM_RUSER"
  6. echo "Rhost: $PAM_RHOST"
  7. echo "Service: $PAM_SERVICE"
  8. echo "TTY: $PAM_TTY"
  9. echo "Date: `date`"
  10. echo "Server: `hostname -f`"
  11. } | mail -s "`hostname -s` $PAM_SERVICE login: $PAM_USER" root