delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2003/09/05/12:16:22

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
Message-ID: <011301c373b3$b4999490$c900000a@docbill002>
From: "Bill C. Riemers" <cygwin AT docbill DOT net>
To: <gsinclair AT soyabean DOT com DOT au>, "Igor Pechtchanski" <cygwin AT cygwin DOT com>
References: <819734548 DOT 20030904220801 AT soyabean DOT com DOT au> <Pine DOT GSO DOT 4 DOT 56 DOT 0309041240220 DOT 1861 AT slinky DOT cs DOT nyu DOT edu> <8824123 DOT 20030905193228 AT soyabean DOT com DOT au>
Subject: Re: ssh problem with $HOME
Date: Fri, 5 Sep 2003 09:40:13 -0400
MIME-Version: 1.0
X-Priority: 3
X-MSMail-Priority: Normal
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165

> I wasn't sure what you meant by the last sentence above.  I do set
> $HOME in windows, so all apps can benefit from it, and /etc/profile
> honours that.  Why ssh feels the need to look at /etc/passwd, when it
> is documented to look at $HOME, I don't know.

Quite simple.  When you run "ssh" it calls "sshd" through a socket
connection.
sshd is running as SYSTEM.  It is unlikely that the home directory for the
$HOME
directory for SYSTEM is the same as your home directory.   Since "sshd" is a
unix
program, not a Windows program it uses the standard method of setting the
$HOME
environmental variable, which is to look it up from /etc/passwd.

For example, on the computer I'm on now, my $HOME is /home/docbill .  My
wife's $HOME is /home/olivia .  SYSTEM's $HOME is /home/SYSTEM.  So if I do:
        ssh -l olivia localhost
sshd has to find out what my wife's home directory.  Not my home directory,
nor SYSTEM's home directory.  If instead it where just to use the current
value of "$HOME", I could change it to enter my wife's account even if I did
not know her password or the Administrator's password.

                                Bill



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