I need a script to grep /home/*/.bash_history and look for keywords or other users usernames. If it finds one of the keywords/usernames email me and make a copy of the .bash_history file. This is what I see the script doing. 1. get a list of users from /etc/passwd 2. search for /home/eachuser/.bash_history 3. When it finds .bash_history grep it for each keyword and the other usernames. Basically looking for the other usernames to make sure they are not messing with other users files. I would also like it to take different actions when it finds different keywords. [login to view URL] if it finds a keyword from this list it will: chsh /bin/false 2. If it finds a keyword from this list it will: /scripts/suspendacct 3. If found on this list it will just email. I would also like 3 to 5 more keyword lists that if the keyword is found it will run another script such as /scripts/something This will give me options for the future. I will also need a place to put a list of usernames 1. not to check at all 2. to check but not chsh or suspend. 3. chsh if any keywords/usernames are found if the keyword is in the suspend list just suspend the account. 4. suspend if any keywords/usernames are found 5. A list of users who's .bash_history needs to be checked but don't check other users .bash_history for their username. If their username is "ls" it would be found in every .bash_history file. It needs to be easy to configure. Everything at the top of the script or a separate config file.
## Deliverables
Complete and fully-functional working program(s) in executable form as well as complete source code of all work done. Complete copyrights to all work purchased.
## Platform
linux
## Deadline information
9/15/2002