daily security report

This commit is contained in:
Leif Johansson 2018-11-01 10:19:13 +01:00
parent 824155e7c9
commit dc65ae72e2
2 changed files with 6 additions and 1 deletions

View file

@ -0,0 +1,4 @@
SHELL=/bin/sh
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
/usr/local/sbin/secreport.sh > /var/log/secreport.log

View file

@ -1,12 +1,13 @@
#!/bin/bash
echo "### $HOSTNAME"
grep 127.0.1.1 /etc/hosts
echo "### SUID binaries"
find / -perm -4000 -ls
echo "### World writable files"
find / -type f -a -perm -o=w
find / -type f -a -perm -o=w -ls
echo "### lines in authorized_keys"
for h in `awk -F: '{print $6}' /etc/passwd`; do