Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , 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 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: <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 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline 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 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/