Sponsored Content
Full Discussion: Log all connecting users
Top Forums UNIX for Dummies Questions & Answers Log all connecting users Post 302097943 by jack1981 on Wednesday 29th of November 2006 03:54:39 PM
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

 

10 More Discussions You Might Find Interesting

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

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

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

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

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

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

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

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

10. 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
RLOGIND(8)						      System Manager's Manual							RLOGIND(8)

NAME
rlogind - remote login server SYNOPSIS
rlogind [ -aln ] DESCRIPTION
Rlogind is the server for the rlogin(1) program. The server provides a remote login facility with authentication based on privileged port numbers from trusted hosts. Rlogind listens for service requests at the port indicated in the ``login'' service specification; see services(5). When a service request is received the following protocol is initiated: 1) The server checks the client's source port. If the port is not in the range 512-1023, the server aborts the connection. 2) The server checks the client's source address and requests the corresponding host name (see IR gethostbyaddr (3), hosts(5) and named(8)). If the hostname cannot be determined, the dot-notation representation of the host address is used. If the hostname is in the same domain as the server (according to the last two components of the domain name), or if the -a option is given, the addresses for the hostname are requested, verifying that the name and address correspond. Normal authentication is bypassed if the address verification fails. Once the source port and address have been checked, rlogind proceeds with the authentication process described in rshd(8). It then allo- cates a pseudo terminal (see pty(4)), and manipulates file descriptors so that the slave half of the pseudo terminal becomes the stdin , stdout , and stderr for a login process. The login process is an instance of the login(1) program, invoked with the -f option if authenti- cation has succeeded. If automatic authentication fails, the user is prompted to log in as if on a standard terminal line. The -l option prevents any authentication based on the user's ``.rhosts'' file, unless the user is logging in as the superuser. The parent of the login process manipulates the master side of the pseudo terminal, operating as an intermediary between the login process and the client instance of the rlogin program. In normal operation, the packet protocol described in pty(4) is invoked to provide ^S/^Q type facilities and propagate interrupt signals to the remote programs. The login process propagates the client terminal's baud rate and terminal type, as found in the environment variable, ``TERM''; see environ(7). The screen or window size of the terminal is requested from the client, and window size changes from the client are propagated to the pseudo terminal. Transport-level keepalive messages are enabled unless the -n option is present. The use of keepalive messages allows sessions to be timed out if the client crashes or becomes unreachable. DIAGNOSTICS
All initial diagnostic messages are indicated by a leading byte with a value of 1, after which any network connections are closed. If there are no errors before login is invoked, a null byte is returned as in indication of success. ``Try again.'' A fork by the server failed. SEE ALSO
login(1), ruserok(3), rshd(8) BUGS
The authentication procedure used here assumes the integrity of each client machine and the connecting medium. This is insecure, but is useful in an ``open'' environment. A facility to allow all data exchanges to be encrypted should be present. A more extensible protocol should be used. 4.2 Berkeley Distribution September 11, 1989 RLOGIND(8)
All times are GMT -4. The time now is 10:41 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy