Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

history

Status
Not open for further replies.

extremedatos

Technical User
Feb 22, 2010
54
AR
hi all,

Im trying to see the history from other users,
lastcomm & sa are not working. is there any way i can see thru terminal what an other user is typing or doing?

thanks all.
 
You can use a programme called kibitz to share a session with another user, so both of you can see and/or type commands. Of course this requires communication and agreement with the user in question.

If you just want to 'spy' on what other users are doing it's not as simple. One way is to monitor their shell history files, but that assumes they are using a shell that actually logs commands, which is not always the case. Also you only get to see the commands they input, not the output.

The other thing you could try is sniffing their network connection with snoop or tcpdump or similar. Interpreting the results is not always so easy though.

Annihilannic.
 
monitoring their shell history file(s) as Annihilannic said is the most simplistic way.. lots of caveats there.

one way to "watch" real time another persons terminal is for them to use GNU Screen, you can then attach to their session. google has a lot more detail on how to use screen.

without knowing exactly what you're trying to accomplish this may or may not be relevant.
 
i don't use the GUI interface i normaly use CLI and what we need is to see the history from the others users.

thanks.
 
hi all still trying to see the history from other users.. any more ideas?

thanks
 
you can cat /home/<username>/.bash_history

Alternatively you could use /etc/profile to script it so that all commands typed are sent to a log file then you just have to tail -f the logfile.
 
w1nn3r,

how can i script or where can i find a script for the profile?

thanks
 
There is a utility called script which you could launch in /etc/profile. It logs everything displayed no a user's terminal (including the commands they type) to a file. However it may interfere with some commands... worth a try though.

Annihilannic.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top