delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2020/04/24/17:43:11

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 4CB473894E6C
Authentication-Results: sourceware.org; dmarc=none (p=none dis=none)
header.from=SystematicSw.ab.ca
Authentication-Results: sourceware.org;
spf=none smtp.mailfrom=brian DOT inglis AT systematicsw DOT ab DOT ca
X-Authority-Analysis: v=2.3 cv=LKf9vKe9 c=1 sm=1 tr=0
a=kiZT5GMN3KAWqtYcXc+/4Q==:117 a=kiZT5GMN3KAWqtYcXc+/4Q==:17
a=IkcTkHD0fZMA:10 a=w_pzkKWiAAAA:8 a=AMpejqzua1VCGlgbdkcA:9 a=QEXdDO2ut3YA:10
a=OO2XiV6ZNdAA:10 a=sRI3_1zDfAgwuvI8zelB:22
Subject: Re: If Cygwin ssh, git, etc. can't find your .ssh directory
To: cygwin AT cygwin DOT com
References: <r7uqk8$3pv4$1 AT ciao DOT gmane DOT io>
<f7177755-059b-0641-4fa6-c1382afbf80d AT towo DOT net>
From: Brian Inglis <Brian DOT Inglis AT SystematicSw DOT ab DOT ca>
Autocrypt: addr=Brian DOT Inglis AT SystematicSw DOT ab DOT ca; prefer-encrypt=mutual;
keydata=
mDMEXopx8xYJKwYBBAHaRw8BAQdAnCK0qv/xwUCCZQoA9BHRYpstERrspfT0NkUWQVuoePa0
LkJyaWFuIEluZ2xpcyA8QnJpYW4uSW5nbGlzQFN5c3RlbWF0aWNTdy5hYi5jYT6IlgQTFggA
PhYhBMM5/lbU970GBS2bZB62lxu92I8YBQJeinHzAhsDBQkJZgGABQsJCAcCBhUKCQgLAgQW
AgMBAh4BAheAAAoJEB62lxu92I8Y0ioBAI8xrggNxziAVmr+Xm6nnyjoujMqWcq3oEhlYGAO
WacZAQDFtdDx2koSVSoOmfaOyRTbIWSf9/Cjai29060fsmdsDLg4BF6KcfMSCisGAQQBl1UB
BQEBB0Awv8kHI2PaEgViDqzbnoe8B9KMHoBZLS92HdC7ZPh8HQMBCAeIfgQYFggAJhYhBMM5
/lbU970GBS2bZB62lxu92I8YBQJeinHzAhsMBQkJZgGAAAoJEB62lxu92I8YZwUBAJw/74rF
IyaSsGI7ewCdCy88Lce/kdwX7zGwid+f8NZ3AQC/ezTFFi5obXnyMxZJN464nPXiggtT9gN5
RSyTY8X+AQ==
Organization: Systematic Software
Message-ID: <ccf1a7e7-6a91-d2f7-3681-b1bd8781beed@SystematicSw.ab.ca>
Date: Fri, 24 Apr 2020 15:42:14 -0600
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101
Thunderbird/68.7.0
MIME-Version: 1.0
In-Reply-To: <f7177755-059b-0641-4fa6-c1382afbf80d@towo.net>
X-CMAE-Envelope: MS4wfK6IIHJaNqN0ax9GcCMgc6h0NK91gQKDfwxw++8LXpBxVrrhTLJ0L4e3urNhmSSNNvTkWP4YEmCE1HzEezicWeGevDmyvWKwUel74c4AnrBhwXk5AcXF
y/fX8a9QOqWyrBLe9GdLzO2T4CpNFqGvRIcSADjL/hUZkWuBJTUGgvi0ewNJmHJRCpEsOLgnhFfJHw==
X-Spam-Status: No, score=-15.9 required=5.0 tests=BAYES_00, BODY_8BITS,
GIT_PATCH_2, KAM_ASCII_DIVIDERS, KAM_DMARC_STATUS, KAM_LAZY_DOMAIN_SECURITY,
RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE,
SPF_NONE, 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-Unsubscribe: <http://cygwin.com/mailman/options/cygwin>,
<mailto:cygwin-request AT cygwin DOT com?subject=unsubscribe>
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>
Reply-To: cygwin AT cygwin DOT com
Errors-To: cygwin-bounces AT cygwin DOT com
Sender: "Cygwin" <cygwin-bounces AT cygwin DOT com>
X-MIME-Autoconverted: from base64 to 8bit by delorie.com id 03OLgqQV031741

On 2020-04-24 09:37, Thomas Wolff wrote:
> Am 24.04.2020 um 15:46 schrieb Mark Hansen:
>> 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.
>> Sorry, this was a mistaken post. If an admin can do so, please delete it. Thanks.

> Not sure why you consider this mistaken. I'm not sure whether it's related but
> occasionally I also have a problem with ssh not finding .ssh. It's caused by ssh
> looking for ~/.ssh while my config dir is in $HOME/.ssh. These are generally
> assumed to be the same, but sometimes I observe the idea of bash what ~ means to
> get broken, without noticeable pattern so fare. It then points to /home/$USER
> while I've configured may HOME on one machine to be somewhere else. Weird...

Entries under /home/ are not modified by Cygwin setup, so it is safe to:

	$ ln -s /proc/cygdrive/c/Users/$USER /home/

which ensures that your Cygwin and Windows home dirs match.

If you tried to e.g.

	$ ln -sT /proc/cygdrive/c/Users /home

Cygwin setup would just remove that link and recreate the directory next run.

-- 
Take care. Thanks, Brian Inglis, Calgary, Alberta, Canada

This email may be disturbing to some readers as it contains
too much technical detail. Reader discretion is advised.
--
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