user.sh 207 B

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