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
"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
> 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 *********************
'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