Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Obtaining client IP address

21 views
Skip to first unread message

Craig Macbride

unread,
Feb 4, 1999, 3:00:00 AM2/4/99
to
A few years ago, for 3.2.4.2, we could use "nwho" (which made its way
into a TLS, TLS059) to obtain the IP address of a client connected to a
SCO box.

Now, "who" has some extra options which can provide this information,
but somewhat unreliably. "who -mx" returns the client host name, but
truncates it to 16 characters, which, unless your domain name is _very_
short, means that part of the domain portion will not be printed.
"who -mux" allows a few more characters at least, but is not documented
as doing so. Indeed, the fact that "who -x" truncates the host name is
not documented in the first place, so it's hardly a behaviour I'd like
to depend on.

Is there a version of nwho or a reliable equivalent around for 5.0.x?

--
Craig Macbride <cr...@glasswings.com.au>
-----------------------http://amarok.glasswings.com.au/~craig---------------
"It's a sense of humour like mine, Carla, that makes me proud
to be ashamed of myself." - Captain Kremmen

John Temples

unread,
Feb 4, 1999, 3:00:00 AM2/4/99
to
In article <79av34$nhv$1...@news.mel.aone.net.au>,

Craig Macbride <cr...@glasswings.com.au> wrote:
>Now, "who" has some extra options which can provide this information,
>but somewhat unreliably. "who -mx" returns the client host name, but
>truncates it to 16 characters

"finger -lp" shows the complete hostname, albeit in a very verbose style
of output.
--
John W. Temples, III || Providing the first public access Internet
Gulfnet Kuwait || site in the Arabian Gulf region

Tony Earnshaw

unread,
Feb 4, 1999, 3:00:00 AM2/4/99
to
Craig Macbride wrote:

> Is there a version of nwho or a reliable equivalent around for 5.0.x?

After a bit of ftp-searching, I came up with a good one for you. And for
us, thanks!

Download ftp.armory.com/pub/scripts/oa/oanwho (script)
Download ftp.armory.com./pub/scobins/flon (binary for 5.0.x)

chmod 755 flon, mv to a bin directory in your path.

Edit oanwho (for 5.0.4):

Change line 1 to: #!/usr/lib/scosh/utilbin/oash
Change line 10 to: OALIB=${OALIB-"/usr/lib/scosh"}

chmod 755 oanwho and mv to a bin directory in your path.

Do 'oanwho'. It'll give you the FQDN of logged-in users. not their IP
numbers. Presuming you have DNS running on your machine.

Thank John H. Dubois iii!

Tony

--
************* THE NEW DIMENSION IN DISTRIBUTION ***********
ilion Faculty B.V.
Tony Earnshaw email: to...@ilion.nl
Randstad 21-57
1314 BH Almere-Stad tel: +31 (0) 36 548 50 10
The Netherlands fax: +31 (0) 36 534 05 34
***************** http://www.ilion.nl *********************

Kevin Smith

unread,
Feb 5, 1999, 3:00:00 AM2/5/99
to
In article <79av34$nhv$1...@news.mel.aone.net.au> cr...@glasswings.com.au (Craig Macbride) writes:
>A few years ago, for 3.2.4.2, we could use "nwho" (which made its way
>into a TLS, TLS059) to obtain the IP address of a client connected to a
>SCO box.
>
>Now, "who" has some extra options which can provide this information,
>but somewhat unreliably. "who -mx" returns the client host name, but
>truncates it to 16 characters, which, unless your domain name is _very_
>short, means that part of the domain portion will not be printed.
>"who -mux" allows a few more characters at least, but is not documented
>as doing so. Indeed, the fact that "who -x" truncates the host name is
>not documented in the first place, so it's hardly a behaviour I'd like
>to depend on.
>
>Is there a version of nwho or a reliable equivalent around for 5.0.x?

'man utmpx' shows 256 characters available for storing the host
name. I think you can safely assume that who -mux will return
up to 256 bytes of host name. I, personally, trust and use it.

From dejanews,

>Let me pass on the gift I received !!
>----------
>From: Rick Getchell
>Sent: Wednesday, November 04, 1998 5:19 PM
>To: Rob K
>Subject: Re: telnet ip address
>
>Thanks to Lawrence Garvin and others for helping me answer nearly the
>same
>question about a week ago...
>
>In OS5.0.4, "who -mux" will give you your FQDN. /etc/host
>(_not_ "/etc/hosts") will convert your FQDN to an IP address, and awk
>will
>filter the std out. Try this on the command line in a telnet session:
>
> /etc/host `who -mux | awk '{print$6}'` | head -1 | awk '{print$4}'

It needs a slight modification (. after the $6) if the names are
not bare hostnames in your local domain.

/etc/host `who -mux | awk '{print$6"."}'` | head -1 | awk '{print$4}'
--
Do two rights make | Kevin Smith, ShadeTree Software, Philadelpha, PA, USA
a libertarian | 001-215-487-3811 shady.com,kevin bbs.cpcn.com,sysop

0 new messages