delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2004/12/29/07:53:25

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/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
Date: Wed, 29 Dec 2004 13:52:45 +0100
From: Corinna Vinschen <corinna-cygwin AT cygwin DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: Ssh ignores $HOME
Message-ID: <20041229125245.GN3232@cygbert.vinschen.de>
Reply-To: cygwin AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
References: <y9lfz1qq13x DOT fsf AT sams DOT informatik DOT uni-tuebingen DOT de> <00e801c4ed55$f82628f0$220110ac AT neeeeeee2> <20041229033942 DOT GA624267 AT hpn5170> <200412291214 DOT iBTCEOB6004636 AT beta DOT mvs DOT co DOT il>
Mime-Version: 1.0
In-Reply-To: <200412291214.iBTCEOB6004636@beta.mvs.co.il>
User-Agent: Mutt/1.4.2i

On Dec 29 14:14, Ehud Karni wrote:
> On Tue, 28 Dec 2004 22:39:42 -0500, Pierre A. Humblet <XXXXXX DOT XXXXXXt AT XXXX DOT XXX> wrote:


http://cygwin.com/acronyms/#PCYMTNQREAIYR


> > See last sentence in
> > http://cygwin.com/faq/faq_2.html#SEC18
> 
> This last sentence needs a correction: If there is no /etc/passwd ssh
> will use the supplied$ HOME.
> 
> I would replace the faq sentence with: "Note that ssh disregard `HOME'
> if /etc/passwd does exist."
> 
> I have checked this situation many times, as I make a minimal ssh
> distribution (that can be run from a CD/flash) that run on machines
> where Cygwin is not installed (and consequently - no mounts and
> no /etc/passwd).

Well, it's a bit more tricky than that.  On a non-Cygwin system you'd
see it immediately.  On Cygwin it's different since Cygwin *fakes* an
/etc/passwd entry for the current user if it can't find /etc/passwd.
While doing that, it evaluates the pw_dir entry by looking for $HOME in
the current environment.  If there's no $HOME, it looks for $HOMEDRIVE
and $HOMEPATH instead.

On my system $HOME doesn't exist, so it looks for $HOMEDRIVE and $HOMEPATH.
These variables still point to the Windows default home directory, which
I don't use under Cygwin.  Consequentially the faked pw_dir entry points
to a directory which has no .ssh subdir.  As a result, ssh doesn't find
any key files etc.

So, even though it looks different on Cygwin, ssh does actually not use
the value of $HOME.


Corinna

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

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