Skip to content

Instantly share code, notes, and snippets.

@gfoss
Last active December 12, 2015 02:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gfoss/4700590 to your computer and use it in GitHub Desktop.
Save gfoss/4700590 to your computer and use it in GitHub Desktop.
simple cronjob to alert on 'unknown/unexpected' access to a system.
0 */1 * * * last -5 | grep -v '[user]\|wtmp\|reboot\|shutdown' && last -10 | grep -v '[user]\|wtmp\|reboot\|shutdown' >> ~/Desktop/ALERT && wall -g [group] ~/Desktop/ALERT
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment