delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2017/04/15/06:59:58

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:to:from:subject:date:message-id:references
:mime-version:content-type:content-transfer-encoding; q=dns; s=
default; b=bIOF7OiXRxvhcwYpwUysjvh8gS/4XiHip9QUUtIpFCLAhaiLcVytc
HqUSHfCQxQcf14lik4soE7NFkFnVmseAPl1iXTUGbF+BulkobkXMBKEyc3feI0gW
ddF6OR/OTbPqaoCrb22eEkdGiS7NvH0TDpS0BamP8kY2bjHpEOxrx4=
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:to:from:subject:date:message-id:references
:mime-version:content-type:content-transfer-encoding; s=default;
bh=rUxLH1YxWFgrXPq7Zteylea9Fmg=; b=dHYa7Lxof+SpGHeTxlzjINhL9R01
STWkoEhsvdcO/yIyy9y7I1lqlBG7GoLjlqFk0EjJmH0kWlxtSdhbAxyuGxBTlYfB
rEUadOrEQP3tcCb+TS9w4atD22limGsBwNUyf4CKPAJxvwtojqWmhqGHTpZti8oU
csEr+dc4RCX4TF8=
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=1.8 required=5.0 tests=BAYES_50,KAM_LAZY_DOMAIN_SECURITY autolearn=no version=3.3.2 spammy=terminals, nsswitch.conf, nsswitchconf, schulman
X-HELO: blaine.gmane.org
To: cygwin AT cygwin DOT com
From: Andrew Schulman <schulman DOT andrew AT epa DOT gov>
Subject: Re: how to make sshd start a shell other than bash when I log in?
Date: Sat, 15 Apr 2017 06:59:26 -0400
Lines: 26
Message-ID: <3pu3fc1nhfkbq413qsp57ulfkhd3lkv5bo@4ax.com>
References: <m2qdec1cc0bk75daeb1rjvvufpoh38irke AT 4ax DOT com> <ocq14k$smg$1 AT blaine DOT gmane DOT org>
Mime-Version: 1.0
X-Archive: encrypt
X-IsSubscribed: yes

> * Andrew Schulman (Thu, 06 Apr 2017 21:22:38 -0400)
> > 
> > My regular shell is fish. To make local terminals run fish instead of bash when
> > I start them, I set
> > 
> > SHELL=/usr/bin/fish
> > 
> > in my desktop environment. This works fine: I start MinTTY, and fish starts.
> > 
> > But when I log into that same host by sshd, bash starts, not fish (since sshd
> > doesn't have access to my desktop environment variables). How can I configure
> > either my ssh client or the ssh server to start fish instead of bash?
> 
> I use db_shell in /etc/nsswitch.conf.

Hm. So this is documented in "The db_shell setting" at
https://cygwin.com/cygwin-ug-net/ntsec.html#ntsec-mapping-nsswitch. AFAICT, the
only useful option there for my purposes is to set

db_shell = /bin/fish

After restarting sshd, this does make fish my login shell. Of course, it makes
fish the login shell for every other user on the host too, but for single-user
hosts such as mine, that works fine. Thanks.

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

- Raw text -


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