result o WHO command
Hi
I logged to a server having sunOS via putty and run the WHO command. the result it gave me the with my local IP. Again I logged to the same server via putty from some other terminal. again i run the who command, it gave me some other IP. It did not give the local IP of that terminal. Ideally it should give the local IP. can someone explain me CDS |
It can only give the IP it can see; maybe that 'terminal' eg Pc is natted.
|
Quote:
Did you try this using some other PC? |
yes, i logged using some other PC.
|
Quote:
Two different PCs will obviously have different IPs. So who is giving correct results. Since you tried to connect to a remote server from two different PCs, so who showed you two different IPs. |
Hi Shivaa
yes, I know that, but the 'Who' command is not showing the IP that it ought to. Who is showing some other IP. in this case, when I execute ifconfig command , it shows its IP as 10.0.0.1(just saying) while who command shows it being connected to some other IP 10.1.5.26 CDS |
ifconfig retuns ip address of the machine where you're logged in, not for the system from where you're logged in.
To me, it seems that result is just confusing you. So can you once check output of following cmds: Code:
~$ who --ips # Prints ip adress |
Hey Shivaa
Thanks for your support.The server has been put on upgrade mode. So i cant access it for next 1-2 days. Will surely put my results here once it goes up Thank you |
Quote:
|
1 Attachment(s)
Hi Shivaa
so this is the fresh result of who command: so In line1 , user1 is my computer and result is correct In Linw 2, I again logged with same username from someother computer, and who command gives 11.11.11.11 as IP, but while running ifconfig command , the Ip is something else(11.11.11.12 lets say) I checked some different thing in line 3, the Ip field something (:1.0) Charan PS: Shivaa,the commands suggested by you are not working on my server environment |
Let's assume that you've connected on Server-A from Server-B and Server-C.
You then invoked who cmd on Server-A and got the results as shown in screenshot. So let me explain, pts stands for psudo terminal type device i.e. it indicates that you're connected on Server-A from some remote system i.e. Server-B or Server-C. Then following to it, an IP address is actually IP address of the remote machine i.e. either Server-B or Server-C. So, 10.10.10.10 is IP address of Server-B. And, 11.11.11.11 is IP address of Server-C. And, In third case, where you can see a 1:0, is nothing but a local xterm with DISPLAY number 1 and instance no. 0. It's an xterm opened from Server-A itself. Therefore there's no IP, but only DISPLAY value is showing. Then run following commands on Server-B and Server-C to check their corresponding IPs. Server-B should have 10.10.10.10 and Server-C should have 11.11.11.11 Code:
~$ ifconfig -a # Run on Server-B and Server-C Quote:
Code:
~$ man who |
All times are GMT -5. The time now is 08:23 AM. |