Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT sources DOT redhat DOT com Delivered-To: mailing list cygwin AT sources DOT redhat DOT com Message-ID: <95B669A7D872D41182A600508BDFFB8C02D02BF9@mlbmx7.ess.harris.com> From: "Davis, William" To: "'Peter Buckley'" , cygwin AT cygwin DOT com Subject: RE: rsh inetd no remote directory Date: Thu, 27 Sep 2001 17:16:41 -0400 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2653.19) Content-Type: text/plain I am just getting started with cygwin, so I don't know the specifics of inetutils, so I provided some vanilla Unix answers: 1) your home directory is whatever is in /etc/passwd 2) you can try to change HOME, but it doesn't work on some shells and even if it did, where is the code that would do it? Peter Buckley [mailto:peter DOT buckley AT cportcorp DOT com] writes: I've created .rhosts, hosts.equiv and hosts files in /etc/ (although I don't know what these are or are for, or if I did it right, I figured if I tried it and got it wrong I might at least get a different error). You will not get an error, you just told it something you did not mean to tell it: ~user/.rhosts says who can be user without passwords and /etc/hosts.equiv has global machine permissions and user mapping. I don't think that is your problem, but you could try this: telnet sys1 login as pbuckley Can you get logged in? If not, then it is a mount problem for the home directory. If you get a message about no home directory, using '/', then track down the directory problem. Assuming the login worked, execute these: echo + >.rhosts exit rsh -l pbuckley sys1 echo hello world By executing the above, the echo into .rhosts says let any user from any system anywhere on the network (which may be the whole world) come in without a password. When your test works, you should do a rm .rhosts to undo that: If that doesn't work (and I think it won't) then it is not a permission problem but a mount problem when trying to come in as something other than telnet. Peter Buckley [mailto:peter DOT buckley AT cportcorp DOT com] writes: But my problem is the same- I have inetutils -14 inetd installed as a service (inetd --install-as-service), and when I try to rsh my_machine 'who' (or any other command) it gives me this error "No remote directory." In the rshd man page, it says this error is caused by the chdir command to the home directory failing. I get the same error from a Solaris machine or an NT machine with cygwin. This message you quote means that permissions in /etc/hosts.equiv are not denying you access and may or may not be allowing it. You cannot get to .rhosts to allow access because it is in the home directory. Peter Buckley [mailto:peter DOT buckley AT cportcorp DOT com] writes: Currently my home directory is on a network share, which I have mounted (system, binmode) to /home/pbuckley. The HOME user environment variable in NT is set to /home/pbuckley. When I rsh with no command (hence rlogin) it takes me to the network share, //network_share/user/pbuckley. Do a grep on /etc/passwd for pbuckley and see what it shows as the home directory. Is it /home/pbuckley? If so, then telnet into the machine as pbuckley and stay logged in. Do a pwd to be sure you have a home directory. Then do the rsh from another terminal (with .rhosts set to + above to avoid permission issues). If that works, then it is an automount issue. If that does not work, then is is an rsh issue specific to the cygwin implementation. Note that setting HOME on the side that is calling rsh does not have any effect on the destination. Also note that most Unix shells do not let you set HOME, or ignore it if you do set it. In csh, the tilde character (~) takes you to your home directory which may not be $HOME in some variations. Peter Buckley [mailto:peter DOT buckley AT cportcorp DOT com] writes: Can anyone tell me where to go to figure this out? I tried setting the HOME environment variable to a local folder, with no change in the error. I have tried starting the service as myself (pbuckley) instead of system, but that doesn't help. If you set home in the shell calling rsh, it has no effect on the other side of the network. If you set it in your csh .login file or your sh/ksh .profile file, then how can the system find those files in your home directory? The /etc/passwd field has to be correct and the mount has to work as above. Peter Buckley [mailto:peter DOT buckley AT cportcorp DOT com] writes: Of course, the kicker is that if I start inetd from the command line, rsh works fine and dandy. Any hints on why it won't work when inetd is a service? Is there a way that I can debug this? I haven't used gdb before, but I saw someone posting about "debugging inetd" in the archives. When you run inetd from the command line, are you running it as root? You should be for standard Unix. To get to root, did you login on the console or log in as pbuckley and su to root? If you logged in as pbuckley, then your home directory is mounted, so there is no mount issue. If you try what I suggested above, I think you will be able to figure out where the problem is located. Then you may need to ask a specific question here that an expert in cygwin mount or cygwin rsh will need to answer. Bill Davis wdavis01 AT harris DOT com -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Bug reporting: http://cygwin.com/bugs.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/