Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

rcp error

Status
Not open for further replies.

dividgil

Technical User
Jul 2, 2004
1
GB
I'm trying to perform a rcp to a remote machine, but it keeps throwing up "LOGNAME: undefined variable" error. When I echo $LOGNAME, it comes up with my username. I have tried setting both the .rhosts and the .hosts.equiv file but to no avail (on both machines as well out of desperation!). Anyone got any ideas? Who has to be the owner of the .rhosts and the .hosts.equiv?
 
I have not come across this error before, however I can tell you how we have this set up at our site, which has a number of Sun (Solaris 8) and HP/Compaq (Tru64) systems.

For rcp (and other r... commands) to work from the current system (Host-A) to a remote system (Host-B), set up the following:
On Host-B, the remote system, in the default login directory of the remote user create a .rhosts file (owned by the remote user, chmod 600) with the following entry:
Host-A.domain.com <username-on-A>

(Note Fully Qualified Domain Names seem to be required on Sun systems but are optional on HP/Compaq systems)

On Host-B, the remote system, in /etc/hosts add the entry:
<IP-Address-of-Host-A> Host-A.domain.com Host-A

In practice we have the same .rhosts on all systems, and each systems /etc/hosts file contains all our known systems, so that we can rcp from any system to any system.

I hope that helps.

Mike
 
you are confusing a lot of things

in the .profile|.kshrc|.login|.cshrc on the remote
sys you are evaluating the NOT defined variable $LOGIN
according to login-shell this variable is not
automatically set
rcp and all (bsd)r cmd are nothing else
as remote login followed by some exec, so they CONSULT
.profile|.kshrc|.login|.cshrc (concording tologin-shell)
.rhosts .host.equiv are here irrelevant.


don't forget, RTFMP :) guggach
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top