APLawrence - Information and Resources for Unix and Linux Systems, Bloggers and the self-employed
RSS Feeds Get APLawrence.com by RSS











(OLDER) <- More Stuff -> (NEWER) (NEWEST)
Home > FAQ > How do I find out what IP address a user logged infrom?
Printer Friendly Version




SCO Unix ® FAQ section

Unix, Xenix and ODT General FAQ



This article is from a FAQ concerning SCO operating systems. While some of the information may be applicable to any OS, or any Unix or Linux OS, it may be specific to SCO Xenix, Open Desktop or Openserver.

There is lots of Linux, Mac OS X and general Unix info elsewhere on this site: Search this site is the best way to find anything.

How do I find out what IP address a user logged in from?



In OSR5, there are options to who, w, last, and finger which provide this information. In a program, you can fetch this information from /etc/utmpx for the appropriate definitions.

The farther back you go through older versions, the less likely you are to find this sort of information.

Current versions have these options as summarized by Bela Lubkin:



Many OpenServer Release 5 utilities can show you the host name; they just don't do so by default:


  • who -x (hostname truncated)
  • who -xu (full length)
  • who -mxu (full length; this tty)
  • w -x [user ...] (truncated)
  • w -X [user ...] (full length; 5.0.4 and later)
  • finger [-s user ...] (truncated)
  • finger -l [user ...] (full length)
  • last -W /etc/wtmpx [user] (truncated; login history)
  • last -W /etc/utmpx [user] (truncated; current)
  • last -H hostname [user] (history for "hostname", use full name even though output will be truncated)


If this page was useful to you, please click to help others find it:  

Your +1's can help friends, contacts, and others on the web find the best stuff when they search.

2 comments



Click here to add your comments





Mon Mar 28 11:27:15 2005:   anonymous


g sf errrr 6 Żop&#9834;}



Thu Jul 22 06:01:01 2010:   jai

gravatar
bash-3.00$ finger -l
Login name: test1
Directory: /home/test1 Shell: /usr/bin/ksh
On since Jul 22 11:48:16 on pts/0, 33 minutes Idle Time
from intense-895645e
On since Jul 22 11:48:22 on pts/1, 33 minutes Idle Time
from 192.168.5.165:0.0
No Plan.

Login name: test3
Directory: /home/test3 Shell: /usr/bin/ksh
On since Jul 22 11:57:31 on pts/2
from 192.168.5.178
No Plan.

Login name: root
Directory: / Shell: /usr/bin/ksh
On since Jul 21 12:38:04 on pts/3, 23 hours Idle Time
from 192.168.1.43
No Plan.

Login name: uniserve
Directory: /home/uniserve Shell: /usr/bin/ksh
On since Jul 21 13:52:34 on pts/5, 22 hours Idle Time
from 192.168.1.137
On since Jul 21 14:44:00 on pts/6, 21 hours Idle Time
from 192.168.1.137
No Plan.
=============================================

Its really fantastic thanks a lot....i felt very happy about this....
also who -X also give the IP address thankyou....
jai.......

Don't miss responses! Subscribe to Comments by RSS or by Email

Click here to add your comments


If you want a picture to show with your comment, go get a Gravatar



Auto FTP Manager

Have you tried Searching this site?

Unix/Linux/Mac OS X support by phone, email or on-site: Support Rates

This is a Unix/Linux resource website. It contains technical articles about Unix, Linux and general computing related subjects, opinion, news, help files, how-to's, tutorials and more. We appreciate comments and article submissions.

Publishing your articles here

Jump to Comments



Many of the products and books I review are things I purchased for my own use. Some were given to me specifically for the purpose of reviewing them. I resell or can earn commissions from the sale of some of these items. Links within these pages may be affiliate links that pay me for referring you to them. That's mostly insignificant amounts of money; whenever it is not I have made my relationship plain. I also may own stock in companies mentioned here. If you have any question, please do feel free to contact me.

Specific links that take you to pages that allow you to purchase the item I reviewed are very likely to pay me a commission. Many of the books I review were given to me by the publishers specifically for the purpose of writing a review. These gifts and referral fees do not affect my opinions; I often give bad reviews anyway.

We use Google third-party advertising companies to serve ads when you visit our website. These companies may use information (not including your name, address, email address, or telephone number) about your visits to this and other websites in order to provide advertisements about goods and services of interest to you. If you would like more information about this practice and to know your choices about not having this information used by these companies, click here.


My Troubleshooting E-Book will show you how to solve tough problems on Linux and Unix systems!


book graphic unix and linux troubleshooting guide




 I sell and support
 Kerio Mail server
g_face.jpg

This post tagged:

       - FAQ




Unix/Linux Consultants

Skills Tests

Guest Post Here