Log all connecting users


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Log all connecting users
# 1  
Old 11-28-2006
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
# 2  
Old 11-28-2006
on which os? but commands like "who" and "ps" should help... under solaris10 dtrace is possible to use for what you want!
# 3  
Old 11-28-2006
I'm more looking for a way to see this in a logfile in realtime, like a daemon that listens for user logins and what protocol they use and then put that in a file.
(I use solaris 8)

/Tonlu
# 4  
Old 11-28-2006
maybe you should write a script and run it via crontab... but for realtime? i don't know....

found something that should work:
http://www.sun.com/bigadmin/content/..._wrappers.html

Last edited by DukeNuke2; 11-28-2006 at 12:17 PM..
# 5  
Old 11-29-2006
just a pointer,

get the pids of daemons such as telnetd, sshd and other
accepting connections and granting ttys

periodically check for any child process of the parent pids extracted above.
From the child pid and ps info, can extract few information.
# 6  
Old 11-29-2006
Not sure if this bash script is of any use to you but it will print all users and processes.

Code:
finger |
awk '{ if (NR > 1) print "echo " $2, $3}
{if (NR > 1) print "ps -U ",$1} ' > myfile
sh myfile
rm myfile

output similar to below

Code:
Jack Jones

PID TTY          TIME CMD
22339 ?        00:00:01 sshd
22340 pts/1    00:00:00 bash
30515 pts/1    00:00:00 sh
30521 pts/1    00:00:00 sh
30522 pts/1    00:00:00 ps

 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Ubuntu

Users Access - AD Authentication - User can't log in?

I have a user who's having troubles logging into one of my servers, that is authenticating with AD. After glancing over /etc/passwd, I found the users account is different than mine and others who aren't having any issues. What's the difference between these two accounts? What's the "1 60 14 60" ?... (1 Reply)
Discussion started by: Nvizn
1 Replies

2. 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

3. 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

4. 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

5. 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

6. 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

7. UNIX for Dummies Questions & Answers

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... (4 Replies)
Discussion started by: Amgrim
4 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