X-Recipient: archive-cygwin@delorie.com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
	:list-unsubscribe:list-subscribe:list-archive:list-post
	:list-help:sender:mime-version:content-type
	:content-transfer-encoding:message-id:date:to:subject:from; q=
	dns; s=default; b=KQ67z6lM2JEt73pHXt2HDFfNSyUQo3hFSwPLiTtMCWxesY
	e6UQh3YxxLS++Gh7lbF//vwWlB8gbpjQi9GTnRM7C061KzlQOTNPx5C1jAm5saIU
	RPJMJkY68tmHqxt9omLM0yJMalw83EgNzuVArzfZoNF2V4JtAH/n4hHRw4ll8=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
	:list-unsubscribe:list-subscribe:list-archive:list-post
	:list-help:sender:mime-version:content-type
	:content-transfer-encoding:message-id:date:to:subject:from; s=
	default; bh=acfkIPixaYSRLyj8Ih/DkTx7Ed8=; b=l2EJ6GkD+6cXB5DCG+vt
	gIGHrO/oSsnCT0ROBflQs4LFdR3wxh0WOLd+dUwOptgKckQAfaPVgSBD20MW/XZM
	3C3fsDKgQzkKxdiW3ni9EoJjzcwTphzNGK2OHvh7LOfQ8yd+Gi2DvrTfpTDUmcv7
	EdJK57ssJaoDn8Mo3vglnH4=
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com
Authentication-Results: sourceware.org; auth=none
X-Spam-SWARE-Status: No, score=-1.5 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 spammy=username, sshd
X-HELO: p3plsmtpa07-05.prod.phx3.secureserver.net
X-Sender: inbox@kosowsky.org
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Message-ID: <24078.58951.690280.502600@consult.pretender>
Date: Fri, 3 Jan 2020 01:59:19 -0500
To: cygwin@cygwin.com
Subject: Missing environment variables when ssh'ing into Windows machine
From: cygwin@kosowsky.org
X-IsSubscribed: yes


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

