Date: Tue, 30 Jun 2020 07:43:12 -0600 From: Brandon helsley <brandon.helsley@hotmail.com> To: Polytropon <freebsd@edvax.de>, Donald Wilde <dwilde1@gmail.com> Cc: Per Hedeland <per@hedeland.org>, freebsd-questions <freebsd-questions@freebsd.org> Subject: Re: Shell Message-ID: <CY4PR19MB010406910592E5762C11D793F96F0@CY4PR19MB0104.namprd19.prod.outlook.com> In-Reply-To: <20200630143913.e27eb3e3.freebsd@edvax.de> References: <20200630143913.e27eb3e3.freebsd@edvax.de> <CY4PR19MB010400AC4940C67421BFADE8F96E0@CY4PR19MB0104.namprd19.prod.outlook.com> <DB8PR06MB6442289C119C69BDF4303E72F66F0@DB8PR06MB6442.eurprd06.prod.outlook.com> <20200630104317.812dce86b2dc5ea5a42a1ee1@sohara.org> <a590654c-ffa2-3171-ce44-ae3f33214b14@hedeland.org> <20200630143913.e27eb3e3.freebsd@edvax.de>
next in thread | previous in thread | raw e-mail | index | archive | help
>Brandon, this is getting esoteric. I hope you can follow and benefit from the responses to your question! Yes you all have been more than helpful. I've been learning very quickly! Thanks again. > > On Jun 30, 2020 at 7:34 AM, Donald Wilde <dwilde1@gmail.com> wrote: > > > On 6/30/20, Polytropon edvax.de> wrote: > On Tue, 30 Jun 2020 13:27:58 +0200, Per Hedeland wrote: >> On 2020-06-30 11:43, Steve O'Hara-Smith wrote: >> > On Tue, 30 Jun 2020 14:44:34 +0530 >> > Manish Jain <bourne.identity@hotmail.com> wrote: >> > >> >> It is often unnoticed that FreeBSD has a mirror of the root user >> >> appropriately named toor (whose shell can be anything). >> > Thank you all for adding to my initial answer to Brandon. >> > Traditionally root ran /bin/csh and toor ran /bin/sh to keep both >> > BSD and AT&T trained sysadmins happy, it really doesn't matter what >> > login >> > shell root uses at work we use zsh, at home I use bash but you could >> > even >> > use mc or vshnu. >> > >> > However the OP was concerned about the prompt (which many people >> > have correctly said involves setting PS1) rather than the shell. >> >> Yes, PS1 is what to set for /bin/sh and its relatives (e.g. bash, > > zsh), but it has no effect for csh/tcsh - there you need to set >> 'prompt' (and the "formatting sequences" are also different). And it >> seems the OP was primarily interested in root's prompt (i.e. csh by >> default). Ah... I'm still learning too. :D > > The first message says that the prompt character is $, which would > not be the case (per default) if the C shell was chosen; so the > case probably is related to "shell changed from C shell to sh", > rather than "the dog ate my configuration files". ;-) > > The command to use here is "chsh". > I would add only one suggestion here, and that would be to consider using bash-static and parking it in a place where it is available in the event of an excruciating mishap. The only concern with doing so is that doing so causes the (larger!) bash-static kernel to be used everywhere. If you have lots of regular users with console prompts, this could be painful. I haven't done this, but it should be possible to instal l both bash-static and bash. One would have to rename the first (bash-static) to something other than 'bash' and add that to the /etc/shells file, but after doing so also install the bash package with the non-monolithic binary 'bash' and use that as the shell for regular users. Have I forgotten any concerns or steps in doing so? It seems to me that the benefits of having full bash capability available for the toor user, and having regular bash available (as opposed to sh or tcsh) for regular users has marked advantages for users (such as myself!) who are not csh adepts. Brandon, this is getting esoteric. I hope you can follow and benefit from the responses to your question! -- Don Wilde **************************************************** * What is the Internet of Things but a system * * of systems including humans? * **************************************************** _______________________________________________ freebsd-questions@freebsd.org mailing list https://lists.freebsd. org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.org" > From owner-freebsd-questions@freebsd.org Tue Jun 30 13:46:17 2020 Return-Path: <owner-freebsd-questions@freebsd.org> Delivered-To: freebsd-questions@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 16E3534B9FF for <freebsd-questions@mailman.nyi.freebsd.org>; Tue, 30 Jun 2020 13:46:17 +0000 (UTC) (envelope-from darcy@druid.net) Received: from mail.vex.net (mail.vex.net [IPv6:2605:2600:1001::44]) by mx1.freebsd.org (Postfix) with ESMTP id 49x5HD1CKnz4Rqt for <freebsd-questions@freebsd.org>; Tue, 30 Jun 2020 13:46:15 +0000 (UTC) (envelope-from darcy@druid.net) Received: from dilbert.druid.net (unknown [216.105.80.127]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: darcy) by mail.vex.net (Postfix) with ESMTPSA id 1100C76A6D for <freebsd-questions@freebsd.org>; Tue, 30 Jun 2020 09:46:09 -0400 (EDT) Subject: Re: Shell To: freebsd-questions@freebsd.org References: <CY4PR19MB010400AC4940C67421BFADE8F96E0@CY4PR19MB0104.namprd19.prod.outlook.com> <DB8PR06MB6442289C119C69BDF4303E72F66F0@DB8PR06MB6442.eurprd06.prod.outlook.com> <20200630104317.812dce86b2dc5ea5a42a1ee1@sohara.org> <a590654c-ffa2-3171-ce44-ae3f33214b14@hedeland.org> <20200630143913.e27eb3e3.freebsd@edvax.de> <CAEC73922LQ+qVMcKoSqNWCiDmo62pwktSX_-Afv=cu5aNN=BeQ@mail.gmail.com> From: D'Arcy Cain <darcy@druid.net> Autocrypt: addr=darcy@druid.net; prefer-encrypt=mutual; keydata= mDMEXu32OxYJKwYBBAHaRw8BAQdAD839OEQVMqCs45KVwLKg4srvl51WsVhMpTGOd9z3Ym20 HUQnQXJjeSBDYWluIDxkYXJjeUBkcnVpZC5uZXQ+iJYEExYIAD4WIQSQJTNYM0vv3aTmBCs/ 5DDweYZnXQUCXu32OwIbAwUJCWYBgAULCQgHAgYVCgkICwIEFgIDAQIeAQIXgAAKCRA/5DDw eYZnXWAxAP9cDL1j4koUFRBNQyC4iMp/cx5KnozmtsFtiTrWdZBrIwD6A2rLFx60tJryd/qp SZpXk7UPDLH/PY1hstjx9WUbXQi4OARe7fY7EgorBgEEAZdVAQUBAQdAbK0SOaTRrkI2QAWz rCz29D2RDOgGTvEbDpyWiyA5RhQDAQgHiH4EGBYIACYWIQSQJTNYM0vv3aTmBCs/5DDweYZn XQUCXu32OwIbDAUJCWYBgAAKCRA/5DDweYZnXaNOAQDC77ymNjoMZQVgDCcmgZEk6IZxn45k nyW17OYCpRctvgD9Fg3aocAbHK7V9AhmSbDPxLNQygQUPjjU7Cyn97b1cQs= Message-ID: <7d9cde32-5936-88f0-5f26-89ebec88e788@druid.net> Date: Tue, 30 Jun 2020 09:46:08 -0400 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:68.0) Gecko/20100101 Thunderbird/68.9.0 MIME-Version: 1.0 In-Reply-To: <CAEC73922LQ+qVMcKoSqNWCiDmo62pwktSX_-Afv=cu5aNN=BeQ@mail.gmail.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="5T3xf3zEQAJD9aUCRkIAWVD3hBQhBpuWE" X-Rspamd-Queue-Id: 49x5HD1CKnz4Rqt X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=none (mx1.freebsd.org: domain of darcy@druid.net has no SPF policy when checking 2605:2600:1001::44) smtp.mailfrom=darcy@druid.net X-Spamd-Result: default: False [-0.78 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; ARC_NA(0.00)[]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; NEURAL_HAM_LONG(-0.81)[-0.811]; MIME_GOOD(-0.20)[multipart/signed,multipart/mixed,text/plain]; TO_DN_NONE(0.00)[]; PREVIOUSLY_DELIVERED(0.00)[freebsd-questions@freebsd.org]; HAS_ATTACHMENT(0.00)[]; RCPT_COUNT_ONE(0.00)[1]; AUTH_NA(1.00)[]; NEURAL_SPAM_MEDIUM(0.41)[0.413]; DMARC_NA(0.00)[druid.net]; NEURAL_SPAM_SHORT(0.72)[0.719]; SIGNED_PGP(-2.00)[]; R_SPF_NA(0.00)[no SPF record]; RCVD_NO_TLS_LAST(0.10)[]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:+,3:~]; ASN(0.00)[asn:19842, ipnet:2605:2600::/32, country:CA]; RCVD_COUNT_TWO(0.00)[2]; MID_RHS_MATCH_FROM(0.00)[] X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: User questions <freebsd-questions.freebsd.org> List-Unsubscribe: <https://lists.freebsd.org/mailman/options/freebsd-questions>, <mailto:freebsd-questions-request@freebsd.org?subject=unsubscribe> List-Archive: <http://lists.freebsd.org/pipermail/freebsd-questions/> List-Post: <mailto:freebsd-questions@freebsd.org> List-Help: <mailto:freebsd-questions-request@freebsd.org?subject=help> List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/freebsd-questions>, <mailto:freebsd-questions-request@freebsd.org?subject=subscribe> X-List-Received-Date: Tue, 30 Jun 2020 13:46:17 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --5T3xf3zEQAJD9aUCRkIAWVD3hBQhBpuWE Content-Type: multipart/mixed; boundary="02hPKlBi3RpzUKOOutzvPo27B8DXlz7Ox" --02hPKlBi3RpzUKOOutzvPo27B8DXlz7Ox Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: quoted-printable On 2020-06-30 09:33, Donald Wilde wrote: > I would add only one suggestion here, and that would be to consider > using bash-static and parking it in a place where it is available in > the event of an excruciating mishap. I use bash for my user and root shell. To deal with mishaps I set my she= ll in passwd to sh and create a small .profile which mainly just has this li= ne: bash && exit 0 That way if bash is fine I run it and immediately exit when it does. If bash is missing or can't run then the exit is skipped and I am in sh so t= hat I can fix things. --=20 D'Arcy J.M. Cain <darcy@druid.net> | Democracy is three wolves http://www.druid.net/darcy/ | and a sheep voting on +1 416 788 2246 (DoD#0082) (eNTP) | what's for dinner. IM: darcy@VybeNetworks.com, VoIP: sip:darcy@druid.net --02hPKlBi3RpzUKOOutzvPo27B8DXlz7Ox-- --5T3xf3zEQAJD9aUCRkIAWVD3hBQhBpuWE Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEARYIAB0WIQSQJTNYM0vv3aTmBCs/5DDweYZnXQUCXvtCIAAKCRA/5DDweYZn XRkeAQCDLGLgcLm1MF8yZOq6h8lT9dr+Fa7kWbSTx2NpymmWGwEAhXMptlYjn9nG m0kfzYk4BXENHb9QDg4+KTsXdKdCMgI= =Kig8 -----END PGP SIGNATURE----- --5T3xf3zEQAJD9aUCRkIAWVD3hBQhBpuWE--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CY4PR19MB010406910592E5762C11D793F96F0>