[net.unix] remote logins not showing up in 'w' command

herber@bgsuvax.UUCP (Steve Herber) (06/10/85)

Wh have recently installed an ethernet consisting of Interlan NA1010A
UNIBUS controller modules to connect a VAX 11/785 to a VAX 11/780, both
are running 4.2BSD.  I have gotten all of the configuration files
updated properly (I think...) like /etc/hosts, /etc/networks, /etc/rc, etc.
Everything seems to work properly.  I can use rlogin to login to the
other VAX on the network.  I can use rcp and rsh to send file across the
network.

OK.... So here's the problem.  When I rlogin to the second VAX and do a
'w' or 'who' command, the user logged into the pseudo terminal from the
network does not show up in the list.  I can use the 'ps' command and see
the user's processes having a pty for a controlling terminal but the
/etc/utmp and /usr/adm/wtmp files are not being updated when the rlogin
occurs.  I have the same problem if I use the telnet software to make
a remote connection.

I have asked a number of other sites about this and noone knows of a
'bug' in the ethernet software to cause this problem.  Everything works,
its just that I don't know who's using the ethernet.  Any ideas????

					Thanks for the help....
						Steve Herber
						bgsuvax!herber
						herber@bgsu.CSNET

bukys@rochester.UUCP (06/12/85)

My first guess would be that you have not added entries for ttyp* to
your /etc/ttys file, so things like ttyslot(), etc, are not working.

Liudvikas Bukys
rochester!bukys (uucp) via allegra, decvax, seismo
bukys@rochester (arpa)

shprentz@bdmrrr.UUCP (Joel Shprentz) (06/13/85)

> We have recently installed an ethernet ...
> 
> OK.... So here's the problem.  When I rlogin to the second VAX and do a
> 'w' or 'who' command, the user logged into the pseudo terminal from the
> network does not show up in the list.  

We encountered a similar problem with our Sun computer when we added a
second system connected via ethernet.  Our solution was to enter pseudo
tty devices into the /etc/ttys file.  A sample entry is:

	02ttyp0


Joel Shprentz
BDM Corporation, McLean, Virginia
(703) 827-7953
{seismo,rlgvax}!bdmrrr!shprentz

anders@suadb.UUCP (06/13/85)

In article <bgsuvax.557> herber@bgsuvax.UUCP writes:
>OK.... So here's the problem.  When I rlogin to the second VAX and do a
>'w' or 'who' command, the user logged into the pseudo terminal from the
>network does not show up in the list.  I can use the 'ps' command and see
>the user's processes having a pty for a controlling terminal but the
>/etc/utmp and /usr/adm/wtmp files are not being updated when the rlogin
>occurs.  I have the same problem if I use the telnet software to make
>a remote connection.

You probably dont have the pseudo tty's as entries in the /etc/ttys
file. That is, entries like: 

                 02ttyp0
                 02ttyp1
                  .
                  .
                 02ttypf

This is a suggestion based purely on experience without any reasoning
on my part. 


---------------------
  Anders Bj|rnerstedt
  Department of Information Processing & Computer Science
  University of Stockholm
  S-106 91  Stockholm
  Sweden

UUCP:	{seismo,decvax,philabs}!{mcvax,ukc,unido}!enea!suadb!anders

paul@ubvax.UUCP (Paul Fries) (06/13/85)

Although I am not a rlogin user (we at Ungermann-Bass Inc. generally
use our own networking that supports full connectivity between terminals
and our hosts, so our terminals aren't connected to the hosts directly...
we can simply call the host we want from our terminals.) I have gotten
the impression that rlogin is handled through the uucp login.  Thus,
your "rlogin"s would appear to be "uucp" logins that are running "uuxqt".

I think this is supported by the fact that "rlogin" doesn't require a
password.  If "login" was being used, you would see the user in a "w",
but you would have to give a password.

spaf@gatech.CSNET (Gene Spafford) (06/13/85)

Another possible problem has to do with site names.  "rwho" will
reject sitenames with a "-" in them unless modified (not all
versions do this, but the vanilla version we got with 4.2 did).
-- 
Gene "3 months and holding" Spafford
The Clouds Project, School of ICS, Georgia Tech, Atlanta GA 30332
CSNet:	Spaf @ GATech		ARPA:	Spaf%GATech.CSNet @ CSNet-Relay.ARPA
uucp:	...!{akgua,allegra,hplabs,ihnp4,linus,seismo,ulysses}!gatech!spaf

ferg@fred.UUCP (David Ferguson) (06/14/85)

> Wh have recently installed an ethernet consisting of Interlan NA1010A
> UNIBUS controller modules to connect a VAX 11/785 to a VAX 11/780, both
> are running 4.2BSD.  I have gotten all of the configuration files
> updated properly (I think...) like /etc/hosts, /etc/networks, /etc/rc, etc.
> 
> OK.... So here's the problem.  When I rlogin to the second VAX and do a
> 'w' or 'who' command, the user logged into the pseudo terminal from the
> network does not show up in the list.  I can use the 'ps' command and see
> the user's processes having a pty for a controlling terminal but the
> /etc/utmp and /usr/adm/wtmp files are not being updated when the rlogin
> occurs.
> 
> 						Steve Herber
> 						bgsuvax!herber

I had the same problem recently with logins for a window system.  The problem
is caused by ttyslot(3) failing to find a line in /etc/ttys, and therefore login
will not write into utmp.  The solution: just add lines to /etc/ttys that look
like '00ttyp0', '00ttyp1', etc.  Should fix it.

David Ferguson
Integrated Solutions, Inc.
(An NBI Company)
{hao | allegra | ucbvax}!nbires!ferg

mwh@teddy.UUCP (06/17/85)

>In article <bgsuvax.557> herber@bgsuvax.UUCP writes:
>>OK.... So here's the problem.  When I rlogin to the second VAX and do a
>>'w' or 'who' command, the user logged into the pseudo terminal from the
>>network does not show up in the list.  I can use the 'ps' command and see
>>the user's processes having a pty for a controlling terminal but the
>>/etc/utmp and /usr/adm/wtmp files are not being updated when the rlogin
>>occurs.  I have the same problem if I use the telnet software to make
>>a remote connection.
>
>You probably dont have the pseudo tty's as entries in the /etc/ttys
>file. That is, entries like: 
>
>                 02ttyp0
>                 02ttyp1
>                  .
>                  .
>                 02ttypf

>This is a suggestion based purely on experience without any reasoning
>on my part. 
>
>
>---------------------
>  Anders Bj|rnerstedt
>  Department of Information Processing & Computer Science
>  University of Stockholm
>  S-106 91  Stockholm
>  Sweden
>
>UUCP:	{seismo,decvax,philabs}!{mcvax,ukc,unido}!enea!suadb!anders

We were having the same problem and discovered that the pseudo tty's not only
need to be in the /etc/ttys file as above, but also in /etc/ttytype:

		network ttyq0
		network ttyq1
		network ttyq2
                  .
                  .
		network ttyqe
		network ttyqf
-- 
->	    Mark W. Harley,  GenRad Inc,  Production Test Division	    <-
->USmail:   Mail Stop 6, 300 Baker Ave, Concord, Mass.  01742		    <-
->usenet:   {decvax,linus,wjh12,mit-eddie,cbosgd,masscomp}!genrad!panda!mwh <-
->tel:	    (617) 369-4400 x2928					    <-

steve@tove.UUCP (Steve D. Miller) (06/19/85)

> Although I am not a rlogin user ... I have gotten the impression
> that rlogin is handled through the uucp login.  Thus, your "rlogin"s
> would appear to be "uucp" logins that are running "uuxqt".
> 
> I think this is supported by the fact that "rlogin" doesn't require a
> password.  If "login" was being used, you would see the user in a "w",
> but you would have to give a password.

Wrong.  Rlogin works using 4.2 IPC; there is a rlogin daemon that lurks
out on some port or another (it's listed in /etc/services) and accepts
connections from other machines.  Some strange authentication protocol
is followed (see the manual entry for rshd), and eventually a login process
gets exec()ed off with the "-r" (use remote protocol) flag.  Login then
reads an environment variable or two (probably just your TERM, but maybe
some other stuff; I'm speaking off the top of my head here, in case you
all hadn't yet noticed), and runs just like it would anywhere else.

   Part of the aforementioned authentication protocol includes a check
of the .rhosts file (if any) in the user's remote directory and, if
necessary, a check of /etc/hosts.equiv to see if the user is "priviledged".
If so, he or she is not asked for a password; if their name (i.e. 
"gyre.arpa steve") is not in their .rhosts, or if their machine (i.e.
"gyre.arpa") is not listed in /etc/hosts.equiv, they get asked for
a password.

   I haven't been following much of the discussion that the original
article started, but I do remember seeing a whole list of things
dealing with pseudo-ttys that sounded like they might well be at
the heart of the problem.  I feel that everyone running 4.2 should
have some pseudo-ttys out there in /dev; there are programs that
never touch the net -- like emacs -- that use them, and strange
things happen when they aren't present.

   Ain't networking grand?!?

-- 
Spoken: Steve Miller 	ARPA:	steve@maryland	Phone: +1-301-454-4251
CSNet:	steve@umcp-cs 	UUCP:	{seismo,allegra}!umcp-cs!steve
USPS: Computer Science Dept., University of Maryland, College Park, MD 20742

west@sdcsla.UUCP (Larry West) (06/21/85)

In article <205@ubvax.UUCP> paul@ubvax.UUCP (Paul Fries) writes:
>Although I am not a rlogin user (we at Ungermann-Bass Inc. generally
>use our own networking that supports full connectivity between terminals
>and our hosts, so our terminals aren't connected to the hosts directly...
>we can simply call the host we want from our terminals.) I have gotten
>the impression that rlogin is handled through the uucp login.  Thus,
>your "rlogin"s would appear to be "uucp" logins that are running "uuxqt".
>
>I think this is supported by the fact that "rlogin" doesn't require a
>password.  If "login" was being used, you would see the user in a "w",
>but you would have to give a password.

Nope.   Rlogin on Berkeley Unix has no relation to "uucp".   It is
implemented using sockets (InterProcess Communication).

Further, "rlogin" does require a password, with two exceptions:

	A) If both machines [the one you are currently on and the
	   one to which you would like to go] are in each other's
	   "/etc/hosts.equiv" -- a list of hosts on which accounts
	   with the same name (number?) are to be considered equal.
	   E.g., "ronald@clown" and "ronald@bozo" are given free
	   access to each other if "clown" and "bozo" are in each
	   other's "hosts.equiv" file.   This is generally useful
	   when an organization has several machines, e.g., on
	   an Ethernet, and people move around from machine to
	   machine.
	
	B) If you have an account named "ronald@whitevax" and
	   another named "constanin@kremvax", it doesn't matter
	   what's in "/etc/hosts.equiv", since the names are
	   different.   So each account (which wants to allow
	   rlogin from the other) can have a file named "~/.rhosts",
	   which is a listing of
			hostname username
	   pairs (one per line).   So "ronald@whitevax" would
	   add this line:
			kremvax constanin
	   to his ".rhosts" file.   (This file must not be a symbolic
	   link, for security reasons, by the way.   And it generally
	   should be readable only by the owner.)

The above applies to "rsh" (remote shell) as well.

Sorry to go on at such length, but I hate to see such misinformation
spread.

The original question has been adequately answered already.
-- 

Larry West			Institute for Cognitive Science
(USA+619-)452-6220		UC San Diego (mailcode C-015) [x6220]
ARPA: <west@nprdc.ARPA>		La Jolla, CA  92093  U.S.A.
UUCP: {ucbvax,sdcrdcf,decvax,ihnp4}!sdcsvax!sdcsla!west OR ulysses!sdcsla!west