delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2020/04/24/09:50:53

X-Recipient: archive-cygwin AT delorie DOT com
X-Original-To: cygwin AT cygwin DOT com
Delivered-To: cygwin AT cygwin DOT com
DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 3F2053893660
Authentication-Results: sourceware.org; dmarc=none (p=none dis=none)
header.from=mehconsulting.com
Authentication-Results: sourceware.org;
spf=pass smtp.mailfrom=goc-cygwin AT m DOT gmane-mx DOT org
X-Injected-Via-Gmane: http://gmane.org/
To: cygwin AT cygwin DOT com
From: Mark Hansen <cygwin AT mehconsulting DOT com>
Subject: If Cygwin ssh, git, etc. can't find your .ssh directory
Date: Fri, 24 Apr 2020 06:46:46 -0700
Message-ID: <r7uqk8$3pv4$1@ciao.gmane.io>
Mime-Version: 1.0
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101
Thunderbird/52.9.1
X-Mozilla-News-Host: news://news.gmane.io:119
X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, FORGED_MUA_MOZILLA,
GIT_PATCH_2, HEADER_FROM_DIFFERENT_DOMAINS, KAM_ASCII_DIVIDERS,
KAM_DMARC_STATUS, SPF_HELO_NONE, SPF_PASS,
TXREP autolearn=ham autolearn_force=no version=3.4.2
X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on
server2.sourceware.org
X-BeenThere: cygwin AT cygwin DOT com
X-Mailman-Version: 2.1.29
List-Id: General Cygwin discussions and problem reports <cygwin.cygwin.com>
List-Archive: <https://cygwin.com/pipermail/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-request AT cygwin DOT com?subject=help>
List-Subscribe: <http://cygwin.com/mailman/listinfo/cygwin>,
<mailto:cygwin-request AT cygwin DOT com?subject=subscribe>
Sender: "Cygwin" <cygwin-bounces AT cygwin DOT com>

I had a case when I took my office laptop home and found that in the Cygwin environment,
commands were not able to find my .ssh directory. It seemed those commands didn't know
where my home directory was, and was defaulting to "/".

After asking on the Cygwin newsgroups, I received the following comment:

-------------------------------------------------------------------------
I also have had to deal with this problem. You should certainly read
https://cygwin.com/cygwin-ug-net/ntsec.html.

After much experimenting and consultation with Corinna, we decided the
best solution for me was:

   * Create /etc/passwd and /etc/group files
       o For /etc/passwd, I included just my account, and I actually
         editted it further to use my preferred username (rather than my
         domain username) and my correct home directory
   * Edit /etc/nsswitch.conf with:
       o passwd: files
       o group: files

This is not the generally recommended configuration, but in the
situation where you cannot reach the domain server, it may be the best
alternative. You may or may not need to back these changes out when you
are back at work. I have not had a problem at work, but we are only
loosely connected to the domain, so YMMV.
-------------------------------------------------------------------------

After making the changes, I rebooted the machine and now it seems to work.

Note that when using the PC from home, I also had to set the HOME environment
variable in the environment variable settings.

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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019