Show Bid Request
Script to keep an eye on users shell activity.
Bid Request Id: 24566
|
|
|
Posted by: |
ezweb (4 ratings)
(Software buyer rating 10)
|
Non-action Ratio: |
Very Good - 22.22%
|
Buyer Security Verifications: |
Good
|
Approved on: |
Aug 15, 2002 10:58:20 AM EDT
|
Bidding Closes: |
Oct 17, 2002 9:28:04 AM EDT
|
Viewed (by coders): |
369 times
|
|
|
|
Description:
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.
1.So if it finds a keyword from this list it will:
chsh <username> /bin/false
2. If it finds a keyword from this list it will:
/scripts/suspendacct <username>
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 <username>
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
Special Conditions / Other:
9/15/2002
Remember that contacting the other party outside of the site (by email, phone, etc.) on all business projects < $500 (before the buyer's money is escrowed) is a violation of both the software buyer and seller agreements.
We monitor all site activity for such violations and can instantly expel transgressers on the spot, so we thank you in advance for your cooperation.
If you notice a violation please help out the site and report it. Thanks for your help.
|
|
Bidding/Comments:
|
All monetary amounts on the site are in United States dollars.
Rent a Coder is a closed auction, so coders can only see their own bids and comments. Buyers can view every posting made on their bid requests. |
See all rejected bids (and all comments)
Name |
Bid Amount |
Date |
Coder Rating |
|
|
|
$20 (USD)
|
Sep 23, 2002 12:24:28 AM EDT
|
10
(Excellent)
|
|
|
Coded as defined with respect to user lists.
For the keywords and actions, I have defined a single list of keyword and action pairs, so if keyword[N] is found perform action[N]. This system is mucher easier to extend than multiple lists of keywords, and you can easily upgrade the severity of a keyword without having to chop and change lists.
I also pull the user's home directory from /etc/password rather than using a hardcoded /home/<user>.
Written in 'use strict', beautifully commented Perl, where each action function is a seperate subroutine, e.g.: performSuspend(), performAction3().
My bid is particularly low so I get that all-important first review.
I can supply an incomplete version of the script for preview purposes if ncessary.
thanks,
-Kingsley Turner |
|
|
|
|
|