summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xlocal/checkauth.sh1
-rwxr-xr-xlocal/listaccounts.sh1
-rwxr-xr-xlocal/listauth.sh1
-rwxr-xr-xlocal/sslcheck.sh4
4 files changed, 7 insertions, 0 deletions
diff --git a/local/checkauth.sh b/local/checkauth.sh
new file mode 100755
index 0000000..a711830
--- /dev/null
+++ b/local/checkauth.sh
@@ -0,0 +1 @@
+grep -E -v 'session (opened|closed) for user ' /var/log/auth.log
diff --git a/local/listaccounts.sh b/local/listaccounts.sh
new file mode 100755
index 0000000..4d1a186
--- /dev/null
+++ b/local/listaccounts.sh
@@ -0,0 +1 @@
+checkauth.sh | grep "Failed password for .* $1" | awk '{print $11}' | sort | uniq -c | sort -n | more
diff --git a/local/listauth.sh b/local/listauth.sh
new file mode 100755
index 0000000..83b68d4
--- /dev/null
+++ b/local/listauth.sh
@@ -0,0 +1 @@
+grep "session opened for user" /var/log/auth.log | awk '{print $11}' | sort | uniq -c
diff --git a/local/sslcheck.sh b/local/sslcheck.sh
new file mode 100755
index 0000000..f04a6ec
--- /dev/null
+++ b/local/sslcheck.sh
@@ -0,0 +1,4 @@
+#!/bin/sh
+
+grep "Failed password for invalid user " /var/log/auth.log | \
+ awk '{print $13}' | sort | uniq -c | sort -n