rsh with command hangs, rlogin works

Andrew DeFaria Andrew@DeFaria.com
Wed May 24 00:23:00 GMT 2006


Lars Björnfot wrote:
> Andrew DeFaria wrote:
>> I have a similar problem. I see you're on Windows 2003 Server. 2003 
>> tightened security a bit.
> Actually "Windows XP Professional Ver 5.1 Build 2600 Service Pack 2". 
> But I have a 2003 server which might be a next target...
Silly me. I thought the 5.1 bit indicated 2003. I should have checked. 
So then your on XP Pro then not 2003 Server. Sorry.
>> Given the above the cygrunsrv will be running as SYSTEM no? Does 
>> SYSTEM have the proper rights?
> I created an 'sshd' user for running the sshd service. 
You created? By hand. Or did you use ssh-host-config. Perhaps the sshd 
user you created was for privilege separation?
> I thought it was used for any cygrunsrv service. Not sure how to 
> verify it.
Start the Services Control Panel applet under Administrative Tools. 
Double click the inetd service and then Log On tab. If Local System 
account is toggle then you are using SYSTEM. Under Windows XP Pro SYSTEM 
has enough privileges to switch user.
> In any case it seems to have proper rights to handle "rsh localhost" 
> (run in.rlogin). Then it should have proper rights to handle "rsh 
> localhost who" (run in.rshd), I though.
I agree. But apparently it doesn't. Although my problem is with 2003 
server I eagerly await any progress you make as it might give me an idea 
as to why I'm having a problem too.
> Could it be some ownership/privileges/existence/contents of some file 
> that in.rshd needs but in.rlogin doesn't? Which file would that be?
Local:grep -e rsh -e rlogin /etc/inetd.conf
shell   stream  tcp     nowait  root    /usr/sbin/in.rshd in.rshd -L
login   stream  tcp     nowait  root    /usr/sbin/in.rlogind in.rlogind
Local:ll /usr/sbin/in.r*
-rwxr-x---+ 1 defaria Users  9728 Jan 13 02:19 /usr/sbin/in.rexecd.exe*
-rwxr-x---+ 1 defaria Users 11264 Jan 13 02:19 /usr/sbin/in.rlogind.exe*
-rwxr-x---+ 1 defaria Users 11264 Jan 13 02:19 /usr/sbin/in.rshd.exe*

> I haven't been able to strace the programs lauched by inetd. "rsh 
> localhost" stops working too when I try it.
>
> Or run in.rshd in a shell, like sshd allows you to... is it impossible?
You do realize that if you hope to have rsh be able to remotely execute 
a command you need to configure it such that you can login without a 
password (~/.rhosts or remove your password from your entry in /etc/passwd).

Wait a second. This just in. On my XP Pro desktop here at work I have 
the same situation! rsh localhost works but rsh localhost id doesn't! 
What's going on here? rsh localhost prompts me for a password. But rsh 
localhost id just hangs...


--
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/



More information about the Cygwin mailing list