From owner-freebsd-questions Sat Oct 14 0: 0:57 2000 Delivered-To: freebsd-questions@freebsd.org Received: from guru.mired.org (okc-27-149-77.mmcable.com [24.27.149.77]) by hub.freebsd.org (Postfix) with SMTP id 9DE9937B66D for ; Sat, 14 Oct 2000 00:00:53 -0700 (PDT) Received: (qmail 47593 invoked by uid 100); 14 Oct 2000 00:25:31 -0000 From: Mike Meyer MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <14823.43003.402130.967775@guru.mired.org> Date: Fri, 13 Oct 2000 19:25:31 -0500 (CDT) To: Dima Dorfman Cc: questions@freebsd.org Subject: Re: changing root shell?? In-Reply-To: <93386669@toto.iv> X-Mailer: VM 6.72 under 21.1 (patch 10) "Capitol Reef" XEmacs Lucid X-face: "5Mnwy%?j>IIV\)A=):rjWL~NB2aH[}Yq8Z=u~vJ`"(,&SiLvbbz2W`;h9L,Yg`+vb1>RG% *h+%X^n0EZd>TM8_IB;a8F?(Fb"lw'IgCoyM.[Lg#r\ Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Dima Dorfman writes: > > binary was linked to a shared object library that has to be loaded every > > time you want to run the program. I have no clue why he would say that > > you couldn't use it because it's dynamically linked. Of course you can > > use it if it's dynamically linked. Just make sure that any libs that it > Libc is in /usr/lib, so unless your / and /usr are on the same > filesystem, the required libraries would be out of reach. If you > really want to use bash as your root shell--this is probably a bad > idea--you can manually compile a statically-linked copy and name it > something like /sbin/bash.static--I used to do this with tcsh before > it was in the base system. There's more than just separate file systems to consider. Every file that *has* to exist before you can get to a root file is one more file that can force you to more extreme measures if it gets corrupted. Since you shouldn't be doing a lot as root, there's not much point in adding that risk if you don't have to. > > Edit /etc/passwd and change the /bin/sh or /bin/csh or what-have-you to > > whatever you want your shell to be. > /etc/passwd is generated from /etc/master.passwd. You should use > `vipw`, or failing that, edit /etc/master.passwd and rebuild the > password databases (something like `pwd_mkdb -p /etc/passwd`, I > think). > > If you don't want to use vi, simply use another editor. Instead of typing > > vi, type pico or type emacs (assuming these are installed). > Setting the environment variable EDITOR will make some programs--vipw, > chsh, and crontab, for example--use the editor you specify. In > (t)csh, the syntax to do that is: "setenv EDITOR emacs" where emacs is > the editor you would like to use. I'm not sure about the (ba)sh > syntax, but I believe it's something like "export EDITOR=emacs". You've got bash and relatives right. You might note that the actual sequence for many things is VISUAL (if set), the EDITOR. This is true for vipw, even though the man page doesn't mention it. The idea was that you would get VISUAL if your termain could support a visual editor, otherwise EDITOR. For bash, you can add that .profile, and other things will inherit it.