public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: "Bill C. Riemers" <cygwin@docbill.net>
To: <gsinclair@soyabean.com.au>, "Igor Pechtchanski" <cygwin@cygwin.com>
Subject: Re: ssh problem with $HOME
Date: Fri, 05 Sep 2003 16:15:00 -0000	[thread overview]
Message-ID: <011301c373b3$b4999490$c900000a@docbill002> (raw)
In-Reply-To: <8824123.20030905193228@soyabean.com.au>

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

      reply	other threads:[~2003-09-05 16:15 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-09-04 12:08 Gavin Sinclair
2003-09-04 16:43 ` Igor Pechtchanski
2003-09-05  9:33   ` Gavin Sinclair
2003-09-05 16:15     ` Bill C. Riemers [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='011301c373b3$b4999490$c900000a@docbill002' \
    --to=cygwin@docbill.net \
    --cc=cygwin@cygwin.com \
    --cc=gsinclair@soyabean.com.au \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).