From nobody Thu Sep 23 08:55:57 2021 X-Original-To: current@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 5748617D2058; Thu, 23 Sep 2021 08:56:08 +0000 (UTC) (envelope-from hans@beastielabs.net) Received: from lb2-smtp-cloud7.xs4all.net (lb2-smtp-cloud7.xs4all.net [194.109.24.28]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.xs4all.net", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4HFTXl2fPPz3lsy; Thu, 23 Sep 2021 08:56:07 +0000 (UTC) (envelope-from hans@beastielabs.net) Received: from cust-b45927b3 ([IPv6:fc0c:c11f:1a16:eab0:99de:cb24:256:b84d]) by smtp-cloud7.xs4all.net with ESMTPSA id TKWLm0iHlISvdTKWNmtAOb; Thu, 23 Sep 2021 10:56:00 +0200 Subject: Re: [HEADSUP] making /bin/sh the default shell for root To: Baptiste Daroussin , current@freebsd.org, arch@FreeBSD.org References: <20210922083645.4vnoajyvwq6wfhdf@aniel.nours.eu> From: Hans Ottevanger Message-ID: <97ebc390-a19e-3203-7016-ce541796eb18@beastielabs.net> Date: Thu, 23 Sep 2021 10:55:57 +0200 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:78.0) Gecko/20100101 Thunderbird/78.14.0 List-Id: Discussions about the use of FreeBSD-current List-Archive: https://lists.freebsd.org/archives/freebsd-current List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-current@freebsd.org MIME-Version: 1.0 In-Reply-To: <20210922083645.4vnoajyvwq6wfhdf@aniel.nours.eu> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-CMAE-Envelope: MS4xfDwXLTV9EBextqRsgc6zTg3xU4SeWBb+rxdrztD40abPcpz80t79S7d4qh5d2eQMrir+1AcSMzTdiZap4stpGCb58UdApQXQdbobIoNuB5lSdJbT2cbq 0suw3ORdNWIch+Ys3YEZO6SBG4TbXQQ/0hIOlpRAFD10B6Jcnr0EzcyDU+IiiykQPo0//zNm6sVtLAj+iUXswe/iL8D6Fo3HWJ7Rtg8eHg8TjYMDcR1e8y9J FEEwlO3eJuo8y+r3AhlquAbfhVX+NwJPwwRXYzFUypc= X-Rspamd-Queue-Id: 4HFTXl2fPPz3lsy X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=none (mx1.freebsd.org: domain of hans@beastielabs.net has no SPF policy when checking 194.109.24.28) smtp.mailfrom=hans@beastielabs.net X-Spamd-Result: default: False [-2.20 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; ARC_NA(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; TO_DN_SOME(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[beastielabs.net]; AUTH_NA(1.00)[]; RWL_MAILSPIKE_GOOD(0.00)[194.109.24.28:from]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_SHORT(-1.00)[-1.000]; R_SPF_NA(0.00)[no SPF record]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:3265, ipnet:194.109.0.0/16, country:NL]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[]; RCVD_IN_DNSWL_LOW(-0.10)[194.109.24.28:from] X-ThisMailContainsUnwantedMimeParts: N On 9/22/21 10:36 AM, Baptiste Daroussin wrote: > Hello, > > TL;DR: this is not a proposal to deorbit csh from base!!! > > For years now, csh is the default root shell for FreeBSD, csh can be confusing > as a default shell for many as all other unix like settled on a bourne shell > compatible interactive shell: zsh, bash, or variant of ksh. > > Recently our sh(1) has receive update to make it more user friendly in > interactive mode: > * command completion (thanks pstef@) > * improvement in the emacs mode, to make it behave by default like other shells > * improvement in the vi mode (in particular the vi edit to respect $EDITOR) > * support for history as described by POSIX. > > This makes it a usable shell by default, which is why I would like to propose to > make it the default shell for root starting FreeBSD 14.0-RELEASE (not MFCed) > > If no strong arguments has been raised until October 15th, I will make this > proposal happen. > > Again just in case: THIS IS NOT A PROPOSAL TO REMOVE CSH FROM BASE! > > Best regards, > Baptiste > Hello, I applaud the proposal to change the default login shell of root to /bin/sh. As you mention the rest of the Unix(-like) world has used a Bourne-like root login shell forever. It is one of the first things I change on a new FreeBSD install anyway. While there, you could change "Charlie &" in the gecos field to something more sensible, e.g. just "Superuser". I know Charlie is there since 4.2BSD, but the reference to a long forgotten baseball player is probably lost by now. Also, a lot of explanation is often needed when users receive (automated) emails from Charlie Root. Once the login shell of root has changed to /bin/sh, I do not see any reason to keep toor around. It is there since 4.3BSD, but I don't know anybody who uses it in the long term. Many will just change the login shell of root to a Bourne-like shell right away. I have experimented a bit with the new usability features of sh in 14.0 and I must say that it was quite a positive experience. I could easily suppress the urge to install and use bash instead of sh. I wonder if the changes (but not the ones to /etc/passwd) could be MFC'd in a few months, once they have matured a bit, so they would land in 13.1. As you mention elsewhere in this thread, usage in scripts is not affected by these changes. And for interactive use it could be a POLA violation, but the astonishment would be a positive one. -- Kind regards, Hans Ottevanger Eindhoven, Netherlands. hans@beastielabs.net www.beastielabs.net