No IP address displayed in who command


 
Thread Tools Search this Thread
Operating Systems Linux SuSE No IP address displayed in who command
# 1  
Old 03-28-2012
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...
# 2  
Old 03-28-2012
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
# 3  
Old 03-29-2012
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
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.
# 5  
Old 03-29-2012
yes W isnt displaying the ipaddress.
Can you pls tell me which log file should i look into ?
# 6  
Old 03-29-2012
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

# 7  
Old 03-29-2012
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
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Find heartbeat ip address with cllsif command

hi~~ my Os is 6.1 i want to find heartbeat ip address from below result. i think, is it en7 onto both nodes? /usr/es/sbin/cluster/utilities/cllsif Adapter Type Network Net Type Attribute Node IP Address Hardware Address Interface Name Global Name ... (2 Replies)
Discussion started by: tomato00
2 Replies

2. OS X (Apple)

Get IP address Command.

i need to pull ip address out after this command ifconfig | grep jnc0 -1 output: BOBVILLAMAC:~ bvilla$ ifconfig | grep jnc0 -1 inet 10.16.91.1 netmask 0xffffff00 broadcast 10.16.91.255 does anyone know how to do that (1 Reply)
Discussion started by: KrazyKracker23
1 Replies

3. UNIX for Dummies Questions & Answers

Customizing from address in mailx command

Currently I am using mailx command for sending mails. But the mail is sent as from userid@servername by default. Is it possible to customise the from mail address in mailx command? Thanks (2 Replies)
Discussion started by: pandeesh
2 Replies

4. Shell Programming and Scripting

configure from address in mailx command

Hi, I need to configure customized from address in mailx command. Can you pls tell me the option for configuring from address. Thanks Latika (9 Replies)
Discussion started by: latika
9 Replies

5. Solaris

Console - root command prompt displayed twice after hitting enter

Dear All, I hope you can help me. I have a pair of E2900's I've inherited. Both running Solaris 9. Both have LOM> consoles. The problem I'm experiencing only occurs when connected to the /dev/console tty. Whenever I hit 'Enter' for a new line, I receive two new lines: - myhost# ... (11 Replies)
Discussion started by: aleith
11 Replies

6. AIX

AIX:Command to get netaddress/subnet address command in IPv4/IP6

AIX:Command to get netaddress/subnet address command in IPv4/IP6 Can anybody help us with a command to retrieve netaddress/subnet address command in IPv4/IP6 on aix machine. net/subnet address is in the format 172.16.212.0(signifies all 255 machines in an IPv4 network) (2 Replies)
Discussion started by: rookie8278
2 Replies

7. Shell Programming and Scripting

how grep the inet address for in ifconfig command

hi, i want to know how to grep inet address for below below is the output of ifconfig command /home/JA> ifconfig eth0 Link encap:Ethernet HWaddr 00:11:0A:5B:2E:E9 inet addr:161.239.203.18 Bcast:161.239.203.127 Mask:255.255.255.128 UP BROADCAST RUNNING... (3 Replies)
Discussion started by: mail2sant
3 Replies

8. Cybersecurity

Help Required: Command to find IP address and command executed of a user

Hi, I am trying to write a script which would figure out who has run which command and their IP. As i dont have any clue as to which commands would do this job, i request some gurus to help me on this. Thanks Vishwas (2 Replies)
Discussion started by: loggedout
2 Replies

9. Shell Programming and Scripting

command to know the IP address

I know the hostname of the m/c which is in the network... whats d command to know the ip address associated with the hostname. (1 Reply)
Discussion started by: suri
1 Replies

10. UNIX for Dummies Questions & Answers

Command for showing IP Address

Hi everyone, nice forum! I need to know if there's a command that will show the IP Address of the machine you are logged into. Eg when you type hostname it returns the name of the machine, I need one that returns the IP address only. Can anyone help or suggest commands that are almost what I... (7 Replies)
Discussion started by: danhodges99
7 Replies
Login or Register to Ask a Question