Newsgroups: comp.lang.c
Path: utzoo!utgpu!cunews!nrcnet0!nrccsb3.di.nrc.ca!cantin
From: cantin@nrccsb2.di.nrc.ca (Claude Cantin)
Subject: rsh, remote user and host names...
Message-ID: <1991Apr18.183805.1433@nrcnet0.nrc.ca>
Originator: cantin@nrccsb3.di.nrc.ca
Sender: root@nrcnet0.nrc.ca (Operator)
Nntp-Posting-Host: nrccsb3.di.nrc.ca
Organization: National Research Council, Ottawa, Canada
Date: Thu, 18 Apr 91 18:38:05 GMT

I'm writing an application which will use "rsh" to an account on our
local server.  That local server's account will not have any passwords, but
will have (for the shell) a program I'm writing in C.

For the utility/application to work properly, the server will need to know
the user name and host name of the remote machine.  If the remote system
is a Silicon Graphics machine, this is easy (I simply get the REMOTEUSER
and REMOTEHOST environment variables).  But NO such variables exist on
the Suns!!!

How can I get the remote host and remote user names????

The server is a Sun 3/60 running SunOS 4.0.3.  "remote" systems are
SGIs running IRIX 3.3.2, and Suns running both SunOS 4.0.3 and SunOS 4.1.1.

Any suggestions???

Thanks you,

-- 
    Claude Cantin			    tel: (613) 993 0240
    M-60, Chemin Montreal		    FAX: (613) 954 2561
    Conseil National de Recherches Canada   BITNET: cantin@nrcvm01
    Ottawa, Canada (K1A 0R6)		    INTERNET: cantin@nrccsb3.di.nrc.ca
