As always, there's an easier way of doing things.
Thanks to :
Dan Stromberg - OAC-DCS <email@example.com>
firstname.lastname@example.org (Eric Wampner ORL)
Jerry de Raad <email@example.com>
Bryan Solie <firstname.lastname@example.org>
"Gyuere Peter" <PETER@LIBWARE.LIB.KLTE.HU>
The easisest method is to retrieve the hostname from the output of the
'who am i' command. After doing this, I simply arp the name to get the
Suggestions were made to use the utmpx database and retrieve info via
getutxent(), but the trouble of making this work lost out to the ease and
quickness of the above solution.
My original question:
> I'm sure somebody is already doing this:
> We have a login that goes directly into an Expect script (its shell) which
> acts as a gateway for our users to connect to other services. We are now
> adding services that require us to limit their use to different machines at
> different times. What I need is an easy way to find out the IP address of the
> machine the users are logging in from. The method I am using now is tracing
> back open files for the port being used to determine which in.telnet session
> is being used and then tracing the open files on that session to find the
> peer address. This takes a long time! Does anyone know of a quicker way to
> find this information?
> Michael R. Kline email@example.com
> Library Systems Division 512-495-4391
> University of Texas General Libraries
> If I can't play poker, what's the point?
This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:09:04 CDT