*BSD News Article 84275


Return to BSD News archive

Path: euryale.cc.adfa.oz.au!newshost.carno.net.au!harbinger.cc.monash.edu.au!munnari.OZ.AU!spool.mu.edu!howland.erols.net!newspump.sol.net!ddsw1!news.mcs.net!hammer.uoregon.edu!newsgate.cuhk.edu.hk!news.att.net.hk!spinnews!wnoc-tyo-news!news.nc.u-tokyo.ac.jp!newssinet!nfeed.gw.nagoya-u.ac.jp!cancer.nca5.ad.jp!news.kpu-m.ac.jp!news.cs.ritsumei.ac.jp!kuis-news!wsclark!gemini!k-sato
From: k-sato@ksato-s.otaru-uc.ac.jp (Koh Sato)
Newsgroups: comp.unix.bsd.freebsd.misc
Subject: Re: Problems with rlogin or rsh.
Date: 3 Dec 1996 06:25:38 GMT
Organization: Otaru University of Commerce, Otaru 047, Japan
Lines: 61
Message-ID: <580h53$u7h@gemini.res.otaru-uc.ac.jp>
References: <57beq0$r4e@gemini.res.otaru-uc.ac.jp>
	<57dc10$3gb@uriah.heep.sax.de>
NNTP-Posting-Host: a-311.ih.otaru-uc.ac.jp
X-Newsreader: mnews [version 1.19] 1995-07/21(Fri)


      Hi.  I got several responses including emails and each of them
  told me something I did not know.   I really thank you.
      I am glad that the stty problem(?) was solved, but the rlogin
  problem  still remains.
  
   In article <57dc10$3gb@uriah.heep.sax.de>,
 j@uriah.heep.sax.de writes:

 > k-sato@res.otaru-uc.ac.jp (Kou Sato) wrote:
 > 
 > >     However, I have a few problems with "rlogin" and "rsh". 
 > >  
 > >         1. I can not rlogin from machine1 to machine2 nor
 > >            from machine2 to machine1.  rlogin claims that
 > >            "invalid user."  
 > 
 > >              * I think my '.rhost' or '/etc/hosts.equiv'
 > >                 has no problem.
 > 
 > I think it has a problem.  Hard to say if you don't tell us more.

    I am sorry for that.  I thought it was OK because I could rlogin
 to the other machines (with SunOS4.1.3) from my machine[12] without
 any problems. 
    Now I remember that when I tried to rlogin from machine1 to machine2
 before I wrote .rhosts, it did not give me any prompt but gave me the
 same claim.   In fact, my machines are not registered to the DNS server
 of our domain.  But they use the server for name resolution.  Their
 /etc/hosts contain their addresses and their /etc/host.conf make them
 to try /etc/hosts first to resolve the names, then DNS if it failed.
 Do reverse resolutions always fail in this case?  Is this the problem?

 > That's what you also need in your .rhosts.  Don't forget that .rhosts
 > files are best kept at mode 0600; they are silently ignored if they
 > are writable by somebody else than the owner or root.

    I thought it is dangerous to keep them writable, but I did not know
 they are ignored in that case.

 > >        2.  'rcp foo.txt machine2:~/' on machine1 succeeds, but
 > >            'rcp foo.txt machine1:~/' on machine2 fails.
 > > 	   stty claims that 'TIOCGETD: Operation not supported.'
 > 
 > I assume you run the csh and have some stty command in your .cshrc.
 > rsh or rcp sessions don't have an associated tty, hence the stty
 > fails.  Simply protect it by:
 > 
 > if ($?prompt) then
 > 	stty <whatever you want>
 > 	... <other things you only want while logged in interactively>
 > endif
 > 
 > (The csh variable `prompt' is only set for interactive shells.)

    I really appreciate this advice since it solved my second problem.
 I have to try another way since I run the bash, but the manual of sh(1)
 helped me.

Koh Sato,
k-sato@res.otaru-uc.ac.jp