Created
December 12, 2019 03:57
-
-
Save sprowell/c3cf9d04f52f764caa8b38d52071fea4 to your computer and use it in GitHub Desktop.
Revisions
-
sprowell created this gist
Dec 12, 2019 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,20 @@ #!/bin/bash PATH=/bin:/usr/bin:/usr/sbin SUBJ="Alert - Remote SSH access from ${PAM_USER}" if [ -z "$PAM_TYPE" -o "$PAM_TYPE" == "open_session" ] then sendmail alert <<END $(hostname) $(date): LOGIN by ${PAM_USER} from ${PAM_RHOST} $(who) END else sendmail alert <<END $(hostname) $(date): LOG OUT by ${PAM_USER} from ${PAM_RHOST} END fi