Hi all,
This is my first mail on the list...
I want to run rsh but this happens
$ rsh localhost ls HANGS for any command
$ rsh localhost works fine
I have set up inetd for cygrunsrv
$ cygrunsrv -I inetd -d "CYGWIN inetd" -p /usr/sbin/inetd -a "-D -d" -e
"CYGWIN=binmode tty ntsec"
-D to allow inetd to run under cygrunsrv
-d to debug output
$ cygrunsrv -V -Q inetd
Service : inetd
Display name : CYGWIN inetd
Current State : Running
Controls Accepted : Stop
Command : /usr/sbin/inetd -D -d
stdin path : /dev/null
stdout path : /var/log/inetd.log
stderr path : /var/log/inetd.log
Environment : CYGWIN="binmode tty ntsec"
Process Type : Own Process
Startup : Automatic
Account : LocalSystem
--------------------------------------------
1. rsh with command (in.rshd) - failing case
--------------------------------------------
$ rsh localhost ls
[Hangs]
$ tail -f inetd.log
someone wants shell
accept, ctrl 3
+ Closing from 20
2148 execl /usr/sbin/in.rshd
2148 reaped, status 0x8b [comes immediately after execl]
$ strace rsh localhost ls > rsh.log
When it hangs I kill the process but these are the final lines:
5267 38986 [main] rsh 3692 __dup_ent: duping servent "cmd",
0x191A4FA8
153 39139 [main] rsh 3692 __dup_ent: duped servent "cmd", 0x4B21E0
68 39207 [main] rsh 3692 cygwin_getservbyname: 0x4B21E0 =
getservbyname (sh
-------------------------------------------------
2. rsh with no command (in.rlogin) - working case
-------------------------------------------------
$ rsh localhost
Last login: Tue May 23 09:57:22 from localhost
Fanfare!!!
You are successfully logged in to this server!!!
$ tail -f inetd.log
someone wants login
accept, ctrl 3
+ Closing from 20
200 execl /usr/sbin/in.rlogind
200 reaped, status 0x100 [comes on exit from shell]
$ strace rsh localhost > rlogin.log
Same three lines as above, here it continues "normally".
5452 12528 [main] rlogin 3636 __dup_ent: duping servent "login",
0x186B4FA8
138 12666 [main] rlogin 3636 __dup_ent: duped servent "login",
0x4B08E0
56 12722 [main] rlogin 3636 cygwin_getservbyname: 0x4B08E0 =
getservbyname (login, tcp)
[snip]
It seems like inetd is configured ok, permissions are ok etc.
Relevant lines from 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
Relevant lines from c:/WINDOWS/system32/drivers/etc/services
login 513/tcp #Remote Login
who 513/udp whod
cmd 514/tcp shell
syslog 514/udp
I have no /etc/hosts.allow or /etc/hosts.equiv but I have .rhosts
$ cat ~/.rhosts
localhost lars
grizzly lars
I have updated all Cygwin packages to the current, but it didn't help.
"cygcheck -s" is attached.
Any help is apprecieated! I'm out of ideas...