delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2016/09/27/23:33:35

X-Recipient: archive-cygwin AT delorie DOT com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:subject:to:references:from:message-id:date
:mime-version:in-reply-to:content-type
:content-transfer-encoding; q=dns; s=default; b=wiJwSj2nmYcs899C
Pd27r1UH4Xw9KfqiXTU48T9g1x0PHcnkprexde6Ql2OIz7aYl3YuDi6ofCu75Nr+
dQS0USZ9Bwm/ZerVu4ndlzNSolXyT9DWOlCUrpCYWgZiVPR7zxea8bKBy+mYjJj7
/wy3S9xOLzQSdCsq5rcJeWm5Ays=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:subject:to:references:from:message-id:date
:mime-version:in-reply-to:content-type
:content-transfer-encoding; s=default; bh=OYp5IhVnp3iO04BrwNOaSQ
s2/3c=; b=se16EJ28/aHB/OemHQFmsdn1yqvicBGmFwm+IpQIvuJ8QLkaD9YI1/
7yb3IX5yy74jknkN4gHTb/LfhPZxfjf6j6DYxskakujnxqzUkvJLJfoEQyzlhqUk
OvZW8py4+uZfTmNawRGzamWjIMUKjSbAZSOAMoDdVZUpv49vLedUU=
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
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
Subject: Re: Use of SHELL env var by login
To: cygwin AT cygwin DOT com
References: <ae3654ca-c23d-975b-61e2-b7edebb3fc6d AT raelity DOT com> <c3kkub9l8g3pa9vv5j29eo252s8btcaf39 AT 4ax DOT com>
From: Ernie Rael <err AT raelity DOT com>
Message-ID: <399f322d-ee09-3bb0-d215-dcd8fb8874f0@raelity.com>
Date: Tue, 27 Sep 2016 20:32:23 -0700
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: <c3kkub9l8g3pa9vv5j29eo252s8btcaf39@4ax.com>
X-CMAE-Envelope: MS4wfL8YbarENKkjFqv+HDISf0X3C9P/eqtmxcaIxZx1cNnj2OCAOZzugX13RZXriRFyFz0Czw3yTUGQNxCBND75oennGyJcOWq+f2xtAABASGqdthgK/9xI TAM8UocZxyfHBeiEWcCRDLVUxEcmDyAFB14=
X-IsSubscribed: yes

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

- Raw text -


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