LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   checking list of logged in users, without logging in to that linux pc. (https://www.linuxquestions.org/questions/programming-9/checking-list-of-logged-in-users-without-logging-in-to-that-linux-pc-820427/)

krishnalite 07-17-2010 03:18 PM

checking list of logged in users, without logging in to that linux pc.
 
Hello,

It is possible to check who logged in with "who" command. If we are also logged in to that linux pc.

But, is there any possibility to check without our login?(not even by ssh)

Our logging in to find that pc, will be wasting the cpu resources.
And may disturb the user who is working on the x-session.

Sergei Steshenko 07-17-2010 03:45 PM

Quote:

Originally Posted by krishnalite (Post 4036570)
Hello,

It is possible to check who logged in with "who" command. If we are also logged in to that linux pc.

But, is there any possibility to check without our login?(not even by ssh)

Our logging in to find that pc, will be wasting the cpu resources.
And may disturb the user who is working on the x-session.

How can you know what is happening in a computer without being able to access it ?

diamondsandrain 07-17-2010 03:50 PM

http://gd.tuwien.ac.at/linuxcommand....ges/rwho1.html

It may be what you are looking for. I believe it requires an open port though.

bathory 07-17-2010 03:58 PM

You can use finger, BUT the remote box must run in.fingerd that is most unlikely in our days

Regards

rdgreenlaw 07-17-2010 04:21 PM

If you have a web server running on the server in question with PHP enabled you could create a php page that shows who is currently logged on.
Code:

<html>
<head>PHP Script to see who is currently logged onto system</head>
<title>Who is logged onto the server</title>
<body>
<h1>Who is logged onto the server</h1>
<?php
echo `who`;
?>
</body>


krishnalite 07-18-2010 03:09 PM

bathory: My systems run fingerd, could u tell me how to find the logged in users with that??

The php code with webserver is a good idea. But, it doesnt suit my environment. Its not server, i have 200+ individual pcs on my lan.
And my plan is to list all the users currently working on all individual pcs.

zirias 07-18-2010 03:29 PM

Code:

finger @host.example.invalid
finger @127.0.0.1

In fact, you should disable fingerd, it's a gaping security hole, revealing valid usernames to anyone.

Some sites use the protocol for completely different purposes nowadays :D (kernel.org)

dwhitney67 07-18-2010 09:22 PM

Use ssh:
Code:

ssh remotesystem who | grep -v $USER
The grep will remove your user id from the results.


P.S. You will need to 1) have a login account on the remote system(s), and 2) install your ssh public key on each system so that you do not need to enter a password.


All times are GMT -5. The time now is 02:34 PM.