delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2001/03/15/08:13:12

Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT sources DOT redhat DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT sources DOT redhat DOT com>
List-Help: <mailto:cygwin-help AT sources DOT redhat DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT sources DOT redhat DOT com
Delivered-To: mailing list cygwin AT sources DOT redhat DOT com
Date: Thu, 15 Mar 2001 14:07:09 +0100
From: Corinna Vinschen <cygwin AT cygwin DOT com>
To: cygwin <cygwin AT cygwin DOT com>
Subject: Re: OpenSSH-2.5.1p2-2 and remote logins: Problem and Workaround
Message-ID: <20010315140709.F12630@cygbert.vinschen.de>
Mail-Followup-To: cygwin <cygwin AT cygwin DOT com>
References: <200103151240 DOT f2FCeur324415 AT jupiter DOT akutech-local DOT de>
Mime-Version: 1.0
User-Agent: Mutt/1.2.5i
In-Reply-To: <200103151240.f2FCeur324415@jupiter.akutech-local.de>; from ralf@akutech.de on Thu, Mar 15, 2001 at 01:40:56PM +0100

I don't know what's going on in your system but I just checked it
out and I can't reproduce the problem. I have the following
setting:

C:\cygwin           /                   system       binmode
D:\home             /home               system       binmode

and my passwd entry has /home/corinna as pw_dir entry.

When I change that to /cygdrive/d/home/corinna, then restart
sshd and then login again, I'm correctly set to my home dir
in D:/home.

Corinna

On Thu, Mar 15, 2001 at 01:40:56PM +0100, Ralf Fassel wrote:
> Hi all,
> with the latest cygwin/openssh combo, I encountered a weird problem
> related to the default format of the HOME entries in /etc/passwd.
> I thought this might be of interest for others, too.
> 
> - When a user has HOME set to c:/home/user, `mkpasswd -l' encodes this
>   as /cygdrive/c/home/user.  So the passwd entry for that user looks
>   like
>      user::...:/cygdrive/c/home/user:/bin/sh
> 
> Starting bash locally from the desktop, everything is fine.
> 
> However, starting a remote session via sshd runs into problems:
> 
> PROBLEM:
> - Using the default /bin/sh in /etc/passwd allows me to log in, but
>   not to my HOME in c:/home/user.  Instead a directory
>   c:/cygwin/cygdrive/c/home/user is created.  It looks like sshd does
>   not grok the /cygdrive/c convention to mean c:/ but instead roots
>   the path `as-is' at /, which is c:/cywgin.
> 
> - When I try to `cd c:/', it does not work:
>     sh$ cd c:/
>     sh$ pwd
>     c
>     sh$ ls
>     ls: '.' no such file or directory
>     sh$
> 
> - however:
>     sh$ cd //c
>     sh$ pwd
>     //c
>     sh$ ls
>     [listing of c:/ as expected]
> 
> - Using /bin/bash as SHELL in /etc/passwd does not work at all, all
>   programs immediately crash (as the `id' and `pwd' to set the
>   prompt).
> 
> WORKAROUND:
> If I change /etc/passwd to read //c/home/user instead of
> /cygdrive/c/home/user, reboot to restart sshd and make it read the new
> passwd file, everything works fine.  I'm logged into in my correct
> HOME, "cd c:/" works.  I also can use /bin/bash in /etc/passwd w/o
> problems.
> 
> It is somewhat unfortunate that the default output of `mkpasswd' leads
> to these problems.
> 
> R'
> 
> --
> Want to unsubscribe from this list?
> Check out: http://cygwin.com/ml/#unsubscribe-simple

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Developer                                mailto:cygwin AT cygwin DOT com
Red Hat, Inc.

--
Want to unsubscribe from this list?
Check out: http://cygwin.com/ml/#unsubscribe-simple

- Raw text -


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