delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2004/03/02/01:00:54

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/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
From: ncokwqc02 AT sneakemail DOT com
To: cygwin AT cygwin DOT com
Subject: RE: can't achieve password-less ssh authentication when my home directory is on a network file server
Date: Mon, 1 Mar 2004 21:57:39 -0800
Message-ID: <9621-29345@sneakemail.com>
MIME-Version: 1.0
In-Reply-To: <Pine.GSO.4.56.0402282039060.19703@slinky.cs.nyu.edu>

> > [snip]

>
> > > - Create a local home directory (e.g. /home/john); mount the remote
> > > directory (//Filer) onto it; then mount c:\cygwin\home\john\.ssh onto
> > > /home/john/.ssh.
> >
> > I want to make sure I understand your suggestion. Does it
> amount to doing
> > the following on 'Alpha'?
> >         mkdir /home/john
> >         mount //Filer/john /home/john
> >         mount c:\cygwin\home\john\.ssh /home/john/.ssh
> >
> > In this case my home directory is at '//Filer/john'.
>
> Yes, exactly.  Note that, as I said below, you will not be able to access
> //Filer/john/.ssh as /home/john/.ssh after that.  You should still be able
> to access it directly as //Filer/john/.ssh, though, so it's no big loss.
> Oh, and you'll need to *create* /home/john/.ssh before mounting
> //Filer/john over it...
>

I gave this a try, but it didn't work as hoped for.

> > BTW, on a related, but slightly different topic, I didn't even
> get to this
> > point until I solved the problem of 'cygrunsrv -S sshd'
> resulting in 'Error
> > 1062'. Thank goodness for 'log' files! When I finally looked at
> > '/var/log/sshd.log' I saw it filled with repetitions of the message
> >         "/var/empty must be owned by root and not group or
> world-writable."
> > Indeed '/var/empty' was owned by 'john:Users'. After I changed it to
> > 'SYSTEM:root', I was able to start 'sshd'. I don't understand why the
> > '/var/empty' directory created by '/bin/ssh-host-config' didn't have the
> > right ownership. But it didn't.
>
> I actually don't recall you attaching the output of "cygcheck -svr" for
> your machine (as requested in <http://cygwin.com/problems.html>).  This
> would tell us, among other things, the version of Windows and the version
> of the openssh package that you're running.  AFAICS, ssh-host-config in
> the latest couple of versions of openssh contains a bit of code specific
> to NT-based systems that *does* chown /var/empty to SYSTEM:544
> (SYSTEM:Administrators, IIRC).  If that didn't work on your machine, we
> need to find out why.
> 	Igor

It's correct that I didn't attach a "cygcheck -svr" report. I can say,
however, that the machines on which I have observed this problem were
running Windows 2000 and 'OpenSSH_3.7.1p2'.

I see what must be the code to create the directory with the proper
permissions/ownership:

.
.
.
# Check if running on NT
_sys="`uname -a`"
_nt=`expr "$_sys" : "CYGWIN_NT"`
.
.
.
# Create /var/empty file used as chroot jail for privilege separation
if [ -f /var/empty ]
then
  echo "Creating /var/empty failed\!"
else
  mkdir -p /var/empty
  # On NT change ownership of that dir to user "system"
  if [ $_nt -gt 0 ]
  then
    chmod 755 /var/empty
    chown system.system /var/empty
  fi
fi
.
.

Should the 'chown' line be 'chown system.root' instead? Anyway, if I have to
install 'sshd' again, I will pay close attention to what happens here.

Thanks for the suggestions.

john


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