delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2017/04/17/10:23:00

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:from:to:subject:date:message-id:references
:in-reply-to:content-type:content-transfer-encoding
:mime-version; q=dns; s=default; b=F9+y0D2wpkt3iZVedgZJ2961q9/P8
Yg0AN3WxEwAoEfSDOsjeq7wPT3AC+PMzciqWVdXNW1VLAZjuworis7oqz1Ka5xNq
ByCjKYgEcd5M5I2RCJ2mh6mGOU1JMt1ZZoEGec0OTIhMCkxh6yA7NZdqgFxPhnbq
u/7pB4zPI7c/bw=
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:from:to:subject:date:message-id:references
:in-reply-to:content-type:content-transfer-encoding
:mime-version; s=default; bh=AfFzxdmCsT+Dw/BaC8su3mtwOV4=; b=pfX
ao9GmiMFcdESampts4j2aMGxy09f0ohKQBXrFEU+0wiv96F+oQ7jm1u8g8INs1hv
ypLhM5FnU0XTtSb37fDjnoabJMrc9BnQwJXPIIwRWftqIa2E1GXfjcoECLjld1mt
fk5YcU16zlLDrwr9TMhcyc1KJRMBaQd+I4LpTsp4=
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=-7.6 required=5.0 tests=BAYES_00,GIT_PATCH_2,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 spammy=HX-DKIM:OpenDKIM, HX-DKIM:Filter, H*r:0400, Hx-spam-relays-external:14.03.0266.001
X-HELO: esa4.dell-outbound.iphmx.com
From: "Gluszczak, Glenn" <Glenn DOT Gluszczak AT dell DOT com>
X-DKIM: OpenDKIM Filter v2.4.3 mailuogwprd04.lss.emc.com v3HEMWru029595
X-DKIM: OpenDKIM Filter v2.4.3 mailuogwprd04.lss.emc.com v3HEMWru029595
To: "cygwin AT cygwin DOT com" <cygwin AT cygwin DOT com>
Subject: RE: how to make sshd start a shell other than bash when I log in?
Date: Mon, 17 Apr 2017 14:22:10 +0000
Message-ID: <91DCAC3CB99C724EB365BB64677FBE7B16D730@MX204CL04.corp.emc.com>
References: <m2qdec1cc0bk75daeb1rjvvufpoh38irke AT 4ax DOT com> <ocq14k$smg$1 AT blaine DOT gmane DOT org> <3pu3fc1nhfkbq413qsp57ulfkhd3lkv5bo AT 4ax DOT com>
In-Reply-To: <3pu3fc1nhfkbq413qsp57ulfkhd3lkv5bo@4ax.com>
MIME-Version: 1.0
X-Sentrion-Hostname: mailusrhubprd52.lss.emc.com
X-RSA-Classifications: public
X-IsSubscribed: yes
X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id v3HEMwjK000531

Odd.  To change to csh with sshd I have /bin/tcsh in /etc/passwd.
I then wanted to automatically switch to CMD so I tried /cygdrive/c/.../cmd.exe but I was getting extra newlines from cmd.
I ended up switching to tcsh in /etc/passwd and using a .login containing

exec cmd /q

to stop the newlines.  

Perhaps you can try a .profile with an exec to fish?


---------------------------------
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


--
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