[comp.unix.wizards] hostnames and the .rhosts file

sullivan@marge.math.binghamton.edu (fred sullivan) (09/21/87)

In Ultrix (I think all versions) and probably in 4.xBSD (correct me if
I'm wrong), the following things appear to happen.  I don't have source;
these are empirical observations:
1. When you do an rsh from machine A to machine B, the hostname of machine B
is looked up as the first entry in /etc/hosts which matches the internet
address (assuming nameservers are not used).
2. If A is not in /etc/hosts.equiv on B, but there is a line in .rhosts for
the user on B with the format "hostname username", then the remote execution
is allowed.
However, it appears that the line is read from .rhosts with a buffer size of
32 characters.  Now if your hostname is marge.math.binghamton.edu, as mine
is, that leaves 5 characters (accounting for the space in between).  Thus
the remote execution fails if your user name has six or more characters.

We have temporarily fixed things by using a shorter name in /etc/hosts.  (I.e., our entry now reads:
128.226.2.1 	marge marge.math.binghamton.edu
rather than
128.226.2.1	marge.math.binghamton.edu marge
so that the host name for the remote execution is marge.  

However, when name server software is being used, the official name of the
host should be the long version.  It appears to me that the buffer size has
to be increased.  Any comments?

Fred Sullivan
Department of Mathematical Sciences
State University of New York at Binghamton
Binghamton, New York  13903
Email: sullivan@marge.math.binghamton.edu