From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 36859 invoked by alias); 3 Jan 2020 06:59:25 -0000 Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com Received: (qmail 36849 invoked by uid 89); 3 Jan 2020 06:59:25 -0000 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 Received: from p3plsmtpa07-05.prod.phx3.secureserver.net (HELO p3plsmtpa07-05.prod.phx3.secureserver.net) (173.201.192.234) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 03 Jan 2020 06:59:24 +0000 Received: from consult.pretender ([146.115.147.63]) by :SMTPAUTH: with ESMTPSA id nGvYiT20eXcz7nGvZiAWSK; Thu, 02 Jan 2020 23:59:21 -0700 X-Sender: inbox@kosowsky.org Received: from consult.pretender (localhost [127.0.0.1]) by consult.pretender (Postfix) with ESMTP id 07940120DFD7 for ; Fri, 3 Jan 2020 01:59:20 -0500 (EST) Received: by consult.pretender (Postfix, from userid 495) id 02C5D120DFD6; Fri, 3 Jan 2020 01:59:20 -0500 (EST) Received: from consult.pretender (localhost [127.0.0.1]) by consult.pretender (Postfix) with ESMTPSA id AFC0C120DFD2 for ; Fri, 3 Jan 2020 01:59:19 -0500 (EST) 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, 03 Jan 2020 06:59:00 -0000 To: cygwin@cygwin.com Subject: Missing environment variables when ssh'ing into Windows machine From: cygwin@kosowsky.org X-IsSubscribed: yes X-SW-Source: 2020-01/txt/msg00026.txt.bz2 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