From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mout.kundenserver.de (mout.kundenserver.de [217.72.192.74]) by sourceware.org (Postfix) with ESMTPS id B1B623893653 for ; Fri, 24 Apr 2020 15:37:32 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org B1B623893653 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=towo.net Authentication-Results: sourceware.org; spf=none smtp.mailfrom=towo@towo.net Received: from [192.168.178.45] ([95.90.245.244]) by mrelayeu.kundenserver.de (mreue107 [212.227.15.183]) with ESMTPSA (Nemesis) id 1M4aEC-1jSY5k1skI-001i0j for ; Fri, 24 Apr 2020 17:37:30 +0200 Subject: Re: If Cygwin ssh, git, etc. can't find your .ssh directory To: cygwin@cygwin.com References: From: Thomas Wolff X-Tagtoolbar-Keys: D20200424173726256 Message-ID: Date: Fri, 24 Apr 2020 17:37:26 +0200 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; format=flowed Content-Transfer-Encoding: 8bit X-Provags-ID: V03:K1:/QCw2LGH3O2CH7LjrjrnGieHU1qrrmWz2sUNXYPC6Pb6jaiWUca VfiTp4P+eoU+gBRUQ1VKMdfyhQi9x+F0hQwEg8ri7Rgxv7XfuzlxcpJ2PRLO7YcvkbMWiqM q+qTr9itnJcMkGtNwIKc3td7HTThGafZ/L0KcY0UDfxY2QZbqGPlwtq4VaHr4DvIPJ9ijMQ r6noyj3G3QmCokVbBrMMA== X-UI-Out-Filterresults: notjunk:1;V03:K0:BjsZCnYBnNU=:7jwaw6L2E4DjzddIDrYsXj FTf7AvLvJ1Uvz/1q8vusjJVHUadyO5hwXYFpywBvXeG4xTsD9unZuPCipp2hSZqtdhIWzusSQ +Um1Z6+LvJo6vhgc/w9IJXvQUG5WltOR3Oc2wPmvcfGzgd2wObzKAGa5OD9M8Ui0ci+J49k+x wn9Xr/103zrgk8foTzETIfEeWPWYH3KISETzCSK3xk4XFYtZ1kM9plhZ/GpKMkfW5F8I7D+Kx 3Ro7zxtjv50aycDsRDMqD7YG6qw8N7qF+3J0honTnC4qlg9X7mSoX8LRSa8p7Ep7kIJZsV7sp 6c/XMzUKFDg2qlbHrwk+NEk+oJ6q1g/Jg2ZffJfNgnznNcyqc11jA83AnhVO/G/uoxXyDrY5H nMFhQLF/jaEPWJoBr0XuNPjNwY3JHXbyc7Wv7VXMFqEou8XG/TnBYcGS0PSfUNd6+xVAC4Rpp UHg9Ji1LKwbkzek9Tc46MXBT5E7dTidXzoaWSMnr9cWAjSeRCGNLEFIffBX873+6seIWWafLV O/2izLDLZhFVdz2RX49HosE5sfERasfT6eHaHIpVWiGniq4DZHuJTibmyd40ofj+jnqQrvkgg j8FkyNBA8k1BGDzviPuQrSpJvxoPox1KBFiAKKm3XSA7j0RNqoT4zHd21PaK9Y1ByYyiDxGNv DZ37qYWjZZgpRRJIdZrP70cxKEudtTwySwDOy+4WkWXzUVcURoLWrl1aVvteaMrEAnX4F2dPR s8JVUujalPSpTEQccdfuqtc25wnjsyVHMmOgvxgRg6DdTwqV+mLZx6aSmfZwOljVHIMcRbvZ0 E3jrK68NlPGZ+uqBWNC22ebbBeN9Ke+1nVptZwRk/4c0phMnio= X-Spam-Status: No, score=-10.2 required=5.0 tests=BAYES_00, BODY_8BITS, GIT_PATCH_2, KAM_ASCII_DIVIDERS, KAM_DMARC_STATUS, KAM_LAZY_DOMAIN_SECURITY, RCVD_IN_DNSWL_NONE, 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 15:37:34 -0000 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...