From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp-out-no.shaw.ca (smtp-out-no.shaw.ca [64.59.134.12]) by sourceware.org (Postfix) with ESMTPS id 4CB473894E6C for ; Fri, 24 Apr 2020 21:42:19 +0000 (GMT) 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.inglis@systematicsw.ab.ca Received: from [192.168.1.104] ([24.64.172.44]) by shaw.ca with ESMTP id S65PjwSFy62brS65QjehFJ; Fri, 24 Apr 2020 15:42:17 -0600 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 Reply-To: cygwin@cygwin.com Subject: Re: If Cygwin ssh, git, etc. can't find your .ssh directory To: cygwin@cygwin.com References: From: Brian Inglis Autocrypt: addr=Brian.Inglis@SystematicSw.ab.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: 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: Content-Type: text/plain; charset=utf-8 Content-Language: en-CA Content-Transfer-Encoding: 8bit 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@cygwin.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: General Cygwin discussions and problem reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Apr 2020 21:42:21 -0000 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.