The following script runs and finds if any new suid has been changed, and redirects the output to a file.
I want to add a mail command in the script, that will send mail to firstname.lastname@example.org. If changes have been made, add a subject line ("Changes have been made") and attach a file (
changes.new). If no changes have been made, add a different subject line ("no changes has been made").
#!/usr/local/bin/bash if [ ! -f "$/suid.old" ] then find / -perm -4000 -o -perm -2000 > ol.list else find / -perm -4000 -o -perm -2000 > new.suid diff suid.old suid.new > changes.new fi