From owner-freebsd-questions@FreeBSD.ORG Fri Dec 24 17:04:14 2004 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 11F1B16A4CE for ; Fri, 24 Dec 2004 17:04:14 +0000 (GMT) Received: from kenmore.kozy-kabin.nl (fia148-72.dsl.hccnet.nl [62.251.72.148]) by mx1.FreeBSD.org (Postfix) with ESMTP id BEA6343D31 for ; Fri, 24 Dec 2004 17:04:12 +0000 (GMT) (envelope-from colin@kenmore.kozy-kabin.nl) Received: from localhost (colin@localhost) by kenmore.kozy-kabin.nl (8.11.6p2/8.11.6) with ESMTP id iBOEcFg00914; Fri, 24 Dec 2004 15:38:19 +0100 (CET) Date: Fri, 24 Dec 2004 15:38:15 +0100 From: "Colin J. Raven" To: Josh Paetzel In-Reply-To: <200412241652.59449.josh@tcbug.org> Message-ID: References: <41C6EE24.4080606@vilot.com> <20041224155358.GB15993@akroteq.com> <200412241006.47078.algould@datawok.com> <200412241652.59449.josh@tcbug.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed cc: Andy Firman cc: freebsd-questions@freebsd.org Subject: Re: bash - superuser X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Dec 2004 17:04:14 -0000 On Dec 24, Josh Paetzel launched this into the bitstream: > On Friday 24 December 2004 16:06, Andrew L. Gould wrote: >> On Friday 24 December 2004 09:53 am, Andy Firman wrote: >>> On Mon, Dec 20, 2004 at 04:54:51PM -0500, Jerry McAllister wrote: >>>> Then the thing to do is create another root account and make >>>> the default shell for that one be bash, leaving the root root >>>> be /bin/sh. >>> >>> So for those of us that want to go back to the way things should >>> be, (leaving root shell be /bin/sh) I fire up vipw and change >>> this: >>> >>> root:*:0:0:Charlie &:/root:/usr/local/bin/bash >>> >>> to this: >>> >>> root:*:0:0:Charlie &:/root:/bin/sh >>> >>> Right? >>> >>> Then I keep using sudo all the time. But if I need to do some >>> big work as root, I can su to root and get bash simply by typing: >>> >>> /usr/local/bin/bash >>> >>> Right? >>> >>> >>> Just want to be clear on this. >>> >>> Thanks. >> >> I think that should do it. >> >> If you wanted root to use bash all the time, couldn't you >> compile/install a static version into /bin/? I've never done it; >> but I know that NetBSD has some statically linked shells in their >> ports (pkgsrc) that install to /bin/, so I would think it should be >> possible. >> >> Best of luck, >> >> Andrew Gould > > I've always been curious as to why you can't(shouldn't?) just change > the shell that root uses. Josh that's been the backbone of this particular thread over the last few days. I'd check the archives and follow the entire thread all the way through, in order to view the (rather eloquent) arguments for and against that have been posted. FWIW (and that's maybe not much) at installation time I use the default shell when su'd, but when I get a new box up and reasonably configured I switch root shell to bash. Notwithstanding all the reasons raised wherein it's thought that "you shouldn't" I've honestly never run into a problem with it - thus far anyway. If eventually I do, well there y'go I guess, I'll rethink the matter through if (or when) the bad things happen.