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 derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

logginf user activity

Status
Not open for further replies.

StickyBit

Technical User
Jan 4, 2002
264
CA
Folks,

I'm looking for a program or a script that will record/log user activity once a user has logged onto a UNIX box. Any help will be appreciated.

Thanks,

Stickybit.
 
If they are using Korn shell, there is a .sh_history file that is automatically generated that records every command the user executes.
 
Here is a little script I use to record a screen shot image of a user. You may be able to adjust it for an incoming telnet. Maybe tee the tty session of the user...

#!/bin/sh
#############################################
# Record User Input/Output during
# telnet sessions
#
#$1 = remote host
#

remoteIP=`who am i | awk '{print $6}'|sed -e s/\(\//g -e s/\)\//g`
remoteHost="$1"
auditDir="/auditlogs/telnet-audit"
date=`date +%m.%d.%y-%H.%M.%S`
user=`who am i | cut -f1 -d' '`
telnet $remoteHost | tee -a "$auditDir/$user@$remoteIP@$date"




Blue [dragon]

If I wasn't Blue, I would just be a Dragon...
 
I don't what the users to know their actions are being logged. I'm trying to build a management server that users can SSH to before managing the network, I also what to capture their entire session not just a command history.

Thanks.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top