setting REMOTEHOST on rlogins
Bernard J. Duffy
bernie at umbc3.umbc.edu
Sat Jun 22 03:30:50 AEST 1991
In article <1991Jun12.174725 at spruce.gsfc.nasa.gov> karl at spruce.gsfc.nasa.gov (karl anderson) writes:
>I'm just getting acquainted with SGI machines after using Suns alot.
>I see that when I rlogin to one of our Irises, an environment variable
>named "REMOTEHOST" is set to the name of the machine I'm logging in
>from. Is this something unique to IRIX? I'd love to be able to do
>that on my Suns - can anyone tell me how? Please answer by email,
>as I don't ordinarily take this group. TIA.
You can make a simple C program that could set this for you and
it would be pretty easy to port to most of your un*x-es . I've noticed
that the who command on most machines states which host a terminal
or X session started a particular login. I think most of the "login"
(like rlogin and telnet) programs / daemons provide this information.
The informat for the REMOTEHOST is held in the world readable /etc/utmp
that the who utility reads for you. Your non-suid (non-prived) program
can scan /etc/utmp and extract the REMOTEHOST. This would be of use
to X users because you can make various terminal settings based on
the originating host (like ^? for DEL when it's not a window on an
IRIS server).
>
>--
>Karl A. Anderson | Internet: karl at forest.gsfc.nasa.gov
>NASA/GSFC code 923 (STX) | voice: (301) 286-3815
>Greenbelt, MD 20771 | #include "std_disclaimer"
Have fun, Bernie bernie at pinhead.acs.umbc.edu
UMBC: the only University with "County" in its name... that's why they
want to change it. MD has lots of schools and very few big cities.
--
Bernie Duffy Systems Programmer II | Bitnet : BERNIE at UMBC2
Academic Computing Services - L005e | Internet : BERNIE at UMBC2.UMBC.EDU
Univ. of Maryland Baltimore County | UUCP : ...!uunet!umbc3!bernie
Baltimore, MD 21228 (U.S.A.) | W: (301) 455-3231 H: (301) 744-2954
More information about the Comp.sys.sgi
mailing list