From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 97083 invoked by alias); 28 Sep 2016 03:33:18 -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 84886 invoked by uid 89); 28 Sep 2016 03:32:38 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.9 required=5.0 tests=BAYES_00,KAM_LAZY_DOMAIN_SECURITY,RCVD_IN_DNSWL_NONE autolearn=no version=3.3.2 spammy=1.7, H*MI:sk:c3kkub9, studying X-HELO: resqmta-po-12v.sys.comcast.net Received: from resqmta-po-12v.sys.comcast.net (HELO resqmta-po-12v.sys.comcast.net) (96.114.154.171) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 28 Sep 2016 03:32:28 +0000 Received: from resomta-po-03v.sys.comcast.net ([96.114.154.227]) by resqmta-po-12v.sys.comcast.net with SMTP id p5bPbuB5plHMYp5bebrd1n; Wed, 28 Sep 2016 03:32:26 +0000 Received: from [IPv6:::1] ([IPv6:2601:646:8580:9390:d17b:9f92:95c8:aeb1]) by resomta-po-03v.sys.comcast.net with SMTP id p5bdbB9XJDbf9p5bebQA0s; Wed, 28 Sep 2016 03:32:26 +0000 Subject: Re: Use of SHELL env var by login To: cygwin@cygwin.com References: From: Ernie Rael Message-ID: <399f322d-ee09-3bb0-d215-dcd8fb8874f0@raelity.com> Date: Wed, 28 Sep 2016 04:17:00 -0000 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.3.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-CMAE-Envelope: MS4wfL8YbarENKkjFqv+HDISf0X3C9P/eqtmxcaIxZx1cNnj2OCAOZzugX13RZXriRFyFz0Czw3yTUGQNxCBND75oennGyJcOWq+f2xtAABASGqdthgK/9xI TAM8UocZxyfHBeiEWcCRDLVUxEcmDyAFB14= X-IsSubscribed: yes X-SW-Source: 2016-09/txt/msg00373.txt.bz2 On 9/27/2016 3:58 AM, Andrew Schulman wrote: >> I just moved the cygwin installation. The "last" peculiarity I ran into >> was that the login shell, with the shortcut "F:\cygwin64\bin\mintty.exe >> -i /Cygwin-Terminal.ico -", a ps showed >> >> /cygdrive/c/cygwin64/bin/bash >> >> instead of /usr/bin/bash >> >> I tracked this down the the windows setting for SHELL, the one you get >> to from windows' SystemProperties dialog, which was >> C:/cygwin64/bin/bash. The /etc/passwd file specifies /bin/bash. >> >> Is this expected behavior? (Though I can see why SHELL is there and I'd >> need to change it) > /etc/passwd is deprecated. Since Cygwin 2.5 IIRC, Cygwin no longer looks for it, > getting information about users directly from the operating system instead. Not exactly. IIUC /etc/passwd is *not* deprecated. /etc/passwd is used if "passwd: files" is in /etc/nsswitch.conf. But I'll be studying about all this in detail very soon. In any event, one of the reasons I'm moving the cygwin installation is so that I have a copy. I'm making sure I know how to switch between installations. I'm finally upgrading my installation from 1.7 (ancient, before SAM/AD and new permissions) and I want to be able to go back temporarily if things don't go smoothly. The only reason I started this thread, is that it seems wrong that $SHELL is used to specify the login shell. AFAIK, it should come from passwd, or (according to my reading of cygwin docs) from one of the methods specified by /etc/nsswitch.conf in modern cygwin releases. When I upgrade, I guess I'll find out. > Unless you have a special need for it, you should remove it. Same for > /etc/group. > > In the absence of /etc/passwd, setting SHELL is the right way to set your login > shell. > > Andrew > > > -- > 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 > > > -- 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