I Need Fantastic Script for Loging
1- X user login to server
2- X user used command du,mkdir,cat .. etc.
3- 1-2 actions and included command print send specified emails.
How can I do? Thanks.
My advice would be to:
1. Using lastb get the last users to login to the server, it's upto you how you use this data (print $1 would give you the user name, but you'd get duplicates).
2. Stick this in a for loop and do for user in `the query above which shows only the usernames`; do cat /home/$user/.bash_history; done;
3. Don't get this. I'm not writing the script for you though, I'll help with anything you've wrote so far, but I think it's unfair to come here just demanding code also - it sounds like homework.
I'm sure there are better more intelligent ways of achieving the same thing anyway.
|All times are GMT -5. The time now is 07:51 AM.|