public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: Ernie Rael <err@raelity.com>
To: cygwin@cygwin.com
Subject: Re: Use of SHELL env var by login
Date: Wed, 28 Sep 2016 04:17:00 -0000	[thread overview]
Message-ID: <399f322d-ee09-3bb0-d215-dcd8fb8874f0@raelity.com> (raw)
In-Reply-To: <c3kkub9l8g3pa9vv5j29eo252s8btcaf39@4ax.com>

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

  parent reply	other threads:[~2016-09-28  3:33 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-26 20:53 Ernie Rael
2016-09-27  2:24 ` Linda Walsh
2016-09-27  5:35   ` Ernie Rael
2016-09-27 11:20 ` Andrew Schulman
2016-09-27 13:13   ` Andrey Repin
2016-09-27 14:48     ` Andrew Schulman
2016-09-27 15:14       ` Andrey Repin
2016-09-27 16:50     ` Linda Walsh
2016-09-27 17:12       ` Andrey Repin
2016-09-27 17:22         ` Linda Walsh
2016-09-28  4:17   ` Ernie Rael [this message]
2016-09-27 17:18 ` Achim Gratz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=399f322d-ee09-3bb0-d215-dcd8fb8874f0@raelity.com \
    --to=err@raelity.com \
    --cc=cygwin@cygwin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).