user 227 B

12345678910111213
  1. #!/bin/sh
  2. ip=`echo $SSH_CONNECTION | cut -d " " -f 1`if [ "$PAM_TYPE" != "close_session" ]; then
  3. if [ "$PAM_TYPE" != "close_session" ]; then
  4. echo """
  5. new user logon
  6. username:
  7. $USER
  8. IP:
  9. $ip
  10. """ | mutt -s "User logon" $email
  11. fi