Extended README to include info on configure.sh
This commit is contained in:
parent
54622cf50f
commit
16fe6181c1
21
README.md
21
README.md
@ -1,6 +1,7 @@
|
||||
# failedlogins.sh #
|
||||
# failedlogins #
|
||||
This is a small Bash script I wrote for a programming & scripting class at
|
||||
school. The script checks for failed SSH logins in /var/log/auth.log by default.
|
||||
school. The script (failedlogins.sh) checks for failed SSH logins in
|
||||
/var/log/auth.log by default.
|
||||
The failed logins are then sent by e-mail to the admin user specified in the
|
||||
Admin variable.
|
||||
The script only mails new failed login attempts since it was last run to avoid
|
||||
@ -15,13 +16,21 @@ or whatever suits your needs. An example (15 minutes after every hour) would be:
|
||||
|
||||
## Compability ##
|
||||
So far I've only tested it on Ubuntu 13.04. The binaries used in the script are
|
||||
hardcoded to avoid unsane environments. The path to these hardcoded binaries
|
||||
hardcoded to avoid unsane environments. The path to these binaries
|
||||
could change on other Linux dists and other *NIX.
|
||||
For this purpose I've created a small configuration script that updates all the
|
||||
binaries to match the current system it's being run on. Since the configuration
|
||||
script is meant to run directly by a user and not in a cronjob there are no
|
||||
hardcoded binaries in this script. Simply run `./configure.sh` in this
|
||||
directory in case failedlogins.sh complains about some binaries.
|
||||
|
||||
The script uses sed, awk (standrad awk), egrep, cat, printf, mail, rm, tail,
|
||||
failedlogins.sh uses sed, awk (standrad awk), egrep, cat, printf, mail, rm, tail,
|
||||
mktemp and regular grep. All of these utilities are pretty standard on a
|
||||
Debian/Ubuntu machine, except for mail which is not included in for example
|
||||
Ubuntu Desktop. On both Ubuntu and Debian this can be installed with
|
||||
`sudo apt-get install mailutils`.
|
||||
|
||||
`sudo apt-get install mailutils`. (Which will also install Postfix if it's not
|
||||
already installed).
|
||||
|
||||
## Flowchart and notes ##
|
||||
These files can be ignored, they are included for the sake of the scripting
|
||||
class and for my own reference.
|
||||
|
Loading…
x
Reference in New Issue
Block a user