How to log what users are doing??


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers How to log what users are doing??
# 1  
Old 10-28-2008
How to log what users are doing??

Guys i am new in forum and come to ask some help in this. What i want is to log what users are doing. Someone told me to make a script and get the history commands of all users and storage this in a DB. but the problem in this is, i want to log all things. Why this? why my 2 machines is only a gateway to access routers and i need to log, 1- the username he logged in, 2- the router he used telnet and 3 - the username he used to login in router.
plz guys help me with this task...
the machine i have to do this is
SunOS xxxxxx 5.8 Generic_117350-24 sun4u sparc SUNW,Sun-Fire-480R

ty all
# 2  
Old 10-28-2008
There's two or three ways. First, OS auditing can be used, but it's kind of weak, IMHO. Second, there exist programs that create taps into the pty devices, allowing you to monitor what users are doing as they are doing it. Third, You can monitor history files, but users can turn off history, or just do their stuff in secret via perl or sh. Finally, there's snoopy.

Snoopy works by being a shared library that is PRELOADed. It's built for UNIX, but should work as well for Solaris. Snoopy traps the library calls for exec() and sends the command and arguments to syslog. You can find it on sourceforge. I have made some enhancements, but the current author of snoopy is not responding to my patches. You can contact me if you need the updates.
# 3  
Old 10-28-2008
Ty very much Otheus, i am looking now for snoopy, but i have a doubt...
this snoopy can log the username he use in a session with a routers?

Edited:

I am trying to install and i get some errors...
whe i use make this is what i get

gcc -shared -O3 -fomit-frame-pointer snoopy.c -osnoopy.so -ldl
snoopy.c: In function `log':
snoopy.c:74: `LOG_AUTHPRIV' undeclared (first use in this function)
snoopy.c:74: (Each undeclared identifier is reported only once
snoopy.c:74: for each function it appears in.)
make: *** [snoopy.so] Error 1


Sry if this is a simple problem, but i dont know much about unix/linux, i am new with this SO

Last edited by Amgrim; 10-28-2008 at 01:20 PM..
# 4  
Old 10-28-2008
Look on sourceforge.net. It logs the userid, the command, and any arguments. No environment variables or input from STDIN are logged. So if he does:
Code:
$ telnet 192.168.3.2

you won't be able to tell what username/password he logs in, because it's not part of the command line. To do that, you should enable packet sniffing and customized filters which will get the relevant data for you. See tethereal and shark.
# 5  
Old 10-28-2008
Ty Otheus, i go see what i can do now, any news i come here post
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Specified log in time for users

I have this task : Check the logintime.txt every minute to only allow user to log in at the specified time. logintime.txt has the following content: USER TIME_START TIME_STOP Example: john 17:00 18:00 My idea is locking the user at the TIME_STOP and unlocking at the TIME_START while... (4 Replies)
Discussion started by: muffle
4 Replies

2. Shell Programming and Scripting

Log to find users who accessed server before

Hi, please provide the steps/commands to find out the user id list who accessed server before i logon same server. Thank you very much ffor all your support. (2 Replies)
Discussion started by: sridhardwh
2 Replies

3. Shell Programming and Scripting

Monitoring a users log in time?

how do i start with this guys? Sample run: $ LOGTIME it2015678 <enter> User it2015678 is CRUZ Tommy H And has logged on to the system for: 8 hours 12 minutes from the time this script was run. (1 Reply)
Discussion started by: skypigeon
1 Replies

4. UNIX for Advanced & Expert Users

Need A Script To List All Failed Log In Users

I need to list all the failed log in users as part of audit report. How can I do so in Linux to find all the audit log records and then upload to a table for future reference. I am using oracle 10g on Linux. Hope I will get a quick response from the experts. Thanks in advance for the tips. (3 Replies)
Discussion started by: oraQ
3 Replies

5. Solaris

RCP users log?

Hello, I'm scurying a server and I'm trying to control what users are using rcp to copy files right now. I've tried to find in last, but it doesn't log there, searched in Sun documentation, so I cannot anywhere telling were rcp stores a log with the users logins. Do you know if is there one and... (1 Reply)
Discussion started by: nefeli
1 Replies

6. Solaris

Log Information about login/logout of any users

Hi to all, i want configure my solaris 10 machine to log all login,logout and "su" in a particularly file. How can i do it? Now i enable auth.* in syslog.conf but the informations are written in a confused mode... Thanks (4 Replies)
Discussion started by: suuuper
4 Replies

7. UNIX for Dummies Questions & Answers

Log all connecting users

How can I log all connecting users an log it to a file? For example: The user 'megan' login to the machine 'client1' with rlogin. How and where can I see that she used the rlogin protocol and that her username is megan? Help..! /Tonlu (5 Replies)
Discussion started by: tonlu
5 Replies

8. UNIX for Dummies Questions & Answers

??? Log file users login and logout..???

hi all... only one question.... what is the file...where show me records login and logout of the unix user's..?? thank you.... I waiting for response... (1 Reply)
Discussion started by: chanfle
1 Replies

9. UNIX for Dummies Questions & Answers

log users real time

hi.... how i can configurator a log file on real time....on unix solaris.... thanks a lot.... Best Regards... (3 Replies)
Discussion started by: chanfle
3 Replies

10. AIX

Log off idle users

How to set a timer for log out users that have been idle for a long time? It is a AIX 5L (0 Replies)
Discussion started by: wtofu
0 Replies
Login or Register to Ask a Question