public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: cygwin@kosowsky.org
To: cygwin@cygwin.com
Subject: Missing environment variables when ssh'ing into Windows machine
Date: Fri, 03 Jan 2020 06:59:00 -0000	[thread overview]
Message-ID: <24078.58951.690280.502600@consult.pretender> (raw)


The Windows variables $USERNAME, $USERPROFILE and $USERDOMAIN are set properly
when opening a cygwin bash shell on a Windows 10 machine.  

However when I *ssh* into that same machine (under the same user name),
the variables are unset in the bash shell.

More generally, it seems that none of my Windows User variables are
set under a remote ssh bash shell while they are all inherited properly
when opening a cygwin bash shell directly on the machine.

I have not had that problem in the past on my other (older) Windows
machine
The only differences that come to mind are:
1. The other machine is Win7 and not Win10
2. On this (Win10) machine I installed cygwin as a non-admin while the
   Win7 machine was installed with admin privileges
3. Because of #2, I start ssh on the Win 10 machine by running
   /usr/sbin/sshd manually as a user, while on Win 7, I am able to
   start sshd as a service, running as SYSTEM
4. This (Win10) machine doesn't have an /etc/passwd file whereas the
   Win7 machine does.

I am assuming that #3 may be the source of the problem...

Still seems strange that these seemingly very basic Windows variables
are not available under ssh.

Any way to fix this?

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

             reply	other threads:[~2020-01-03  6:59 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-03  6:59 cygwin [this message]
2020-01-03 15:45 ` cygwin
2020-01-06  1:54   ` UPDATE " cygwin

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=24078.58951.690280.502600@consult.pretender \
    --to=cygwin@kosowsky.org \
    --cc=cygwin@cygwin.com \
    /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).