Bullet proof of user history activity


 
Thread Tools Search this Thread
Operating Systems AIX Bullet proof of user history activity
# 1  
Old 01-20-2009
Question Bullet proof of user history activity

Hi, is there a bullet proof of getting the history of all commands entered by a user on a specific server and idealy with the times ?

We have several servers. Therefore we can simply logon to one and do RLOGINS to go to others. We always first logon to servers with our personnal login and then switch to root. From there we can either work directly or switch to a few other users. We have the option of connecting to another server using RLOGIN (but with first being root as we don`t have to enter passwords on the rlogined server).

I have to find out if a specific employee did some work over the weekend as it is causing major escalation pain.

I am not sure if just doing a ROOT> HISTORY -999 is safe enough to check the activity of any users on one specific server no matter how they connected to it.

[added comments]
I just remembered that someone here once retrieved every single screen outputs that was done on one specific server including command prompt. Maybe that is what I need but don't recall how he did it.

We are using /bin/ksh shell by the way and AIX v4.2

Last edited by Browser_ice; 01-20-2009 at 08:28 AM..
# 2  
Old 01-20-2009
I saw an interesting take on this problem once. Only Operations had the root password, and management approval was required to give it out. Admins gained root access by running a shell script (call it suroot) which called the script command to direct the screen activity to a temporary file, then called sudo to put the caller into root shell. When root was exited the script sent the screen output file to a remote security server. When root was entered and exited, an email was sent to the security server. This did not prevent the root user from removing or altering the temporary script file, so it was no proof against clever malice. But an audit that showed entry and exit without a screen file would have been flagged. But even that might have been hacked. The tool was more for a record of what was done, which was useful for honest admins to diagnose a goof-up.

In your case, this is closing the barn door. If you can't trust root, who can you trust?
# 3  
Old 01-20-2009
Error

I have plans to change this (in fact just about everything) and got the GO to do so.

But in the mean time, I need to get an answer to this problem as we had a problem on the last weekend and it got escaladed to the directors. I have to find out if an employee is telling me the truth on what he did or if he is lying to me (what I believe but the proofs are slim). He claims he did a task but when I look at the folders, I do not see this. I need to get a proof he did not do it and not that he had problems doing it or did it wrong.
# 4  
Old 01-20-2009
So, the user could have edited the file as root? Or would he/she have done so as him/herself? My initial thought is that you could run a find on all files modified since last week...

find <directory> -mtime -7 -user <user>
# 5  
Old 01-26-2009
if the employee knows what he is doing, you have no way to find out specific commands to a specific time
check the history file $HOME/.sh_history, if it has been deleted you can see if the employee is trying to hide something

if you delete a specific command from the .sh_history using vi, it's not possible to scroll back since the history file is a special file, check out for this

you can follow his IP-Adress using the "last" command from server to server and see where he was logged in, so you can say if he has been on this server or not

perhaps tell us what you expect he was doing, maybe there is another way


for the future, you can use sudosh, which shows the user input in realtime! you can play it like a movie, including backspace and so on, or put the following entries in /etc/profile, that is what we are doing:

export HISTFILE=/somedir/${LOGNAME}_`date "+%Y%m%d_%H%M%S"`
export HISTSIZE=2000000

the disadvantage of this is, that the user is able to delete this files
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Track activity of a user

Hi All We have a job which writes files to a server at a particular time. The files will be created by a particular user ID Today, during the execution of the job, it created a file to the server and the file sat on the server for sometime, but was deleted immediately at the end of the... (4 Replies)
Discussion started by: sparks
4 Replies

2. UNIX for Dummies Questions & Answers

How to track user activity?

Hi All Please can you help me with the following issue: A certain vendor installed an application in which for a user to log in; the user must use a user created/predefined by the application. And because this application has more than one user its difficult to track who did what and when,... (6 Replies)
Discussion started by: fretagi
6 Replies

3. Shell Programming and Scripting

Audit user activity

Need some help in coming up to log all the activity that is used with our common "unix account". Ideally I am looking for to log the activity in a "separate" file for each session or login until the user logout, I would like to capture the date/time and terminal login and record all the ... (3 Replies)
Discussion started by: rajmanna
3 Replies

4. UNIX for Dummies Questions & Answers

History to Another file [local user history , but root access]

Hi all, My need is : 1. To know who , when , which command used. 2. Local user should not delete this information. I mean , with an example , i can say i have a user user1 i need to give all the following permissions to user1, : a. A specific directory other than his home... (1 Reply)
Discussion started by: sriky86
1 Replies

5. UNIX for Advanced & Expert Users

History to Another file [local user history , but root access]

Hi all, My need is : 1. To know who , when , which command used. 2. Local user should not delete this information. I mean , with an example , i can say i have a user user1 i need to give all the following permissions to user1, : a. A specific directory other than his home... (3 Replies)
Discussion started by: linuxadmin
3 Replies

6. UNIX for Dummies Questions & Answers

Commands to monitor other user's activity

What commands would you recommend in order to monitor things like when a user logs on to a server, assuming you know that user's name on the server? (2 Replies)
Discussion started by: Sotau
2 Replies

7. Shell Programming and Scripting

SVN activity of certain user

Hi there, I'm looking for some help to get a little script done that shows me (or counts) only the added lines from an SVN repository of one specific user. Anybody has an idea? Thanks, Michael (0 Replies)
Discussion started by: MichaelGiese
0 Replies

8. UNIX for Dummies Questions & Answers

audit user activity - possible?

Hi, I have been asked if it is possible to track the last time a specific user logged in to the sysetm. checked my documentation but can't see it there - google is not being very helpful either. I wonder if someone here can help - it will be much appreciated. Thanks Suresh (1 Reply)
Discussion started by: sureshy
1 Replies

9. UNIX for Advanced & Expert Users

Force user to disconnect if no activity

Does anybody know how to force a user to automatically logoff a UNIX session if there is no keyboard activity for a period of time? We use COBOL and there is a BEFORE TIME option on the ACCEPT command, however, we do not want to change the many programs we have to detect this. What we really... (3 Replies)
Discussion started by: MarkN
3 Replies
Login or Register to Ask a Question