No IP address displayed in who command | Unix Linux Forums | SuSE

  Go Back    


SuSE SUSE Linux is a major operating system. The developer rights are owned by Novell, Inc.

No IP address displayed in who command

SuSE


Tags
display, xserver

Closed Thread    
 
Thread Tools Search this Thread Display Modes
    #1  
Old 03-28-2012
Arun_Linux Arun_Linux is offline
Registered User
 
Join Date: Feb 2012
Last Activity: 30 July 2014, 3:50 AM EDT
Location: India
Posts: 93
Thanks: 18
Thanked 8 Times in 8 Posts
Java No IP address displayed in who command

when i open a terminal session of my SUSE server using puTTy and type "who am i" then it displays my local pc ip address.


Code:
root@LinuxSUSE1> who am i
root    pts/8        2012-03-28 16:02 (192.168.134.213)

But when i open a terminal session of my SUSE server using Xmanager's Xstart and type "who am i" then it doesnt display the ipaddress.
Note: Xstart is similar to Putty. It comes built in with xserver "Xmanager"


Code:
root@LinuxSUSE1> who am i
root    pts/8        2012-03-28 16:02

The problem is, i'm unable to find the ip address of the users who are logged into my server.
Any help...
Sponsored Links
    #2  
Old 03-28-2012
bitlord bitlord is offline
Registered User
 
Join Date: Mar 2010
Last Activity: 17 September 2014, 3:57 PM EDT
Posts: 333
Thanks: 12
Thanked 41 Times in 39 Posts
Ok,
I'm not a SUSIE admin, but this what I would do.
To see who is on the server use one of the following commands; whois, who, w
example:
Code:
# w

The w command gives you the most info.

I would then do this to see what process they are running

Code:
# ps -ef|grep username

To see what ip address the server has do this

Code:
# ifconfig -a

This will give you the if address.

You can view the system logs to where the user made his connection from.

I hope this helps
Sponsored Links
    #3  
Old 03-29-2012
Arun_Linux Arun_Linux is offline
Registered User
 
Join Date: Feb 2012
Last Activity: 30 July 2014, 3:50 AM EDT
Location: India
Posts: 93
Thanks: 18
Thanked 8 Times in 8 Posts
thanks bitlord for your reply. But none of your suggestions helped.
w command does give more info. but its not displaying the users terminal ip address.
ps -ef|grep username gives only the process run by the user.
ifconfig -a give servers ip address and
systemlogs has only system activities recorded, it has no details about ipaddress of the user logged in.
    #4  
Old 03-29-2012
bitlord bitlord is offline
Registered User
 
Join Date: Mar 2010
Last Activity: 17 September 2014, 3:57 PM EDT
Posts: 333
Thanks: 12
Thanked 41 Times in 39 Posts
this what I get from the w command

Code:
[antone@server ~]$ w
 08:35:20 up 23 days, 22:16,  7 users,  load average: 0.06, 0.09, 0.09
USER     TTY      FROM              LOGIN@   IDLE   JCPU   PCPU WHAT
antone   pts/2    :1.0             06Mar12 11.00s  0.33s  2:59  gnome-terminal
antone   pts/1    :1.0             05Mar12 21:27m  0.08s  0.08s bash
antone   pts/3    :1.0             07Mar12 19:49m  0.12s  0.12s bash
antone   pts/4    :1.0             09Mar12  1.00s  0.15s  0.06s w
bob      pts/6    :2.0             09Mar12 19days  0.29s  0.04s ssh randes@10.1.0.121
bob      pts/5    :2.0             09Mar12 19days  0.07s  0.07s ksh
antone   pts/7    :1.0             21Mar12 44:50m  0.09s  0.09s bash

The bolded line is not what your looking for? The system logs will tell you who is making a connection. Example: user bob connection from 10.1.0.21. I have seen failues and successful logins in the logs.

Sorry if the info was not helpful. Most of my experience is Solaris and RHEL. I have found most of the stuff I do on RHEL works on SUSIE.
Sponsored Links
    #5  
Old 03-29-2012
Arun_Linux Arun_Linux is offline
Registered User
 
Join Date: Feb 2012
Last Activity: 30 July 2014, 3:50 AM EDT
Location: India
Posts: 93
Thanks: 18
Thanked 8 Times in 8 Posts
yes W isnt displaying the ipaddress.
Can you pls tell me which log file should i look into ?
Sponsored Links
    #6  
Old 03-29-2012
in2nix4life's Avatar
in2nix4life in2nix4life is offline
Registered User
 
Join Date: Oct 2007
Last Activity: 18 September 2014, 10:23 AM EDT
Location: East Coast
Posts: 611
Thanks: 1
Thanked 176 Times in 162 Posts
I haven't managed SuSE systems in centuries, but have you tried the 'lastlog' command? It may display all the information (including IP Address) that you're looking for.


Code:
lastlog | grep -v Never

Sponsored Links
    #7  
Old 03-29-2012
bitlord bitlord is offline
Registered User
 
Join Date: Mar 2010
Last Activity: 17 September 2014, 3:57 PM EDT
Posts: 333
Thanks: 12
Thanked 41 Times in 39 Posts
When I'm on a Linux box, mostly RHEL, the log is here.
/var/log/messages
As the guy above says you can also do this.

Code:
[antone@server ~]$ sudo last

This shows you everyone who is logged in and gives you the hostname or IP
Sponsored Links
Closed Thread

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Console - root command prompt displayed twice after hitting enter aleith Solaris 11 06-22-2010 01:23 AM
AIX:Command to get netaddress/subnet address command in IPv4/IP6 rookie8278 AIX 2 06-17-2009 11:35 AM
Help Required: Command to find IP address and command executed of a user loggedout Security 2 08-06-2008 08:12 PM
command to know the IP address suri Shell Programming and Scripting 1 03-14-2007 03:57 AM
Command for showing IP Address danhodges99 UNIX for Dummies Questions & Answers 7 08-23-2002 08:00 AM



All times are GMT -4. The time now is 09:59 AM.