delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2006/06/02/19:01:48

X-Spam-Check-By: sourceware.org
To: cygwin AT cygwin DOT com
From: Andrew DeFaria <Andrew AT DeFaria DOT com>
Subject: Re: rsh with command hangs, rlogin works
Date: Fri, 02 Jun 2006 16:01:19 -0700
Lines: 49
Message-ID: <e5qfvv$b9h$1@sea.gmane.org>
References: <25840 DOT 217 DOT 209 DOT 153 DOT 73 DOT 1149285742 DOT squirrel AT www DOT webmail DOT nuclear-diagnostics DOT com>
Mime-Version: 1.0
User-Agent: Thunderbird 1.5.0.4 (Windows/20060516)
In-Reply-To: <25840.217.209.153.73.1149285742.squirrel@www.webmail.nuclear-diagnostics.com>
X-IsSubscribed: yes
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

Lars Björnfot wrote:
>> $ rsh localhost ls HANGS for any command
> Still unsolved but: I noted a SIGSEGV message in the syslog which 
> explains why it hangs.
>
> /var/log/messages:
> Jun 2 23:39:12 baloo kernel: in.rshd[3308]: segfault at 00000003 rip 
> 0022E4E5 rsp 0022E454 error 4
>
> I downloaded the inetutil sources, added some syslog lines and 
> pinpointed the problem to the rresvport() call:
>
> rshd.c:
> s = rresvport(&lport);
>
> rshd crashes on the first attempt, when lport=1023.
You and I are working on similar problems lately. I spent some time 
installing syslogd hoping to get more info about this much like you. I 
got syslogd installed and running - but nothing ever logged anything to 
/var/log/messages 'cept start and stop messages. IOW, with syslogd 
running, rsh <machine> put nothing into /var/log/messages. Once syslogd 
is up and running, how do you switch such services to log to there?

Regarding in.rshd dying, I have seen in.rshd.stackdump's around.

BTW Lars, how did you get rsh passwordless login configured via .rhosts? 
I had done this successfully in the past but I remember having to change 
the permissions on my home directory by opening them up a bit (I believe 
I needed to add Everybody Read access but I forget - it was a while 
ago). Note that we use networked home directories from another server 
that is mounted to essentially /home (actually /us). So while I have 
what I think is a validly formated ~/.rhosts it's really 
//<server>/<share>/adefaria/.rhosts.

Another thing I noticed in my digging around last night - In order to 
avoid the complications of having everybody set up their .rhosts 
properly and play with permissions, in the past on our old 2000 server I 
simply removed the password field in /etc/passwd. This also allows 
passwordless logins without having to setup and maintain ~/.rhosts 
files. Insecure - I know - but it worked.

Now we are on a 2003 server and it appears security has been tightened 
somewhat. Now if I have a user who's password field has been removed and 
I try an rsh I get "Switch user <username> failed"! If I put something 
the password field I get prompted for a password and rsh works. However 
rsh <machine> <command> still fails. It seems clear to me that this is 
in or close to the code that is supposed to echo a message "Permission 
denied" or whatever error is supposed to be issued when one tries an rsh 
with a command but their .rhosts is not set up properly...


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019