From owner-freebsd-questions Wed Jan 22 17:17:38 1997 Return-Path: Received: (from root@localhost) by freefall.freebsd.org (8.8.5/8.8.5) id RAA16679 for questions-outgoing; Wed, 22 Jan 1997 17:17:38 -0800 (PST) Received: from mh004.infi.net (mh004.infi.net [198.22.1.119]) by freefall.freebsd.org (8.8.5/8.8.5) with ESMTP id RAA16665 for ; Wed, 22 Jan 1997 17:17:33 -0800 (PST) Received: from codie04 by mh004.infi.net with SMTP (Infinet-S-3.3) id UAA13741; Wed, 22 Jan 1997 20:18:03 -0500 (EST) Message-ID: <32E6BC0A.61BC@dc.infi.net> Date: Wed, 22 Jan 1997 20:16:58 -0500 From: Ron Steele X-Mailer: Mozilla 3.0Gold (X11; I; HP-UX A.09.04 9000/887) MIME-Version: 1.0 To: questions@freebsd.org Subject: Re: How can I chang my root shell References: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-questions@freebsd.org X-Loop: FreeBSD.org Precedence: bulk Nessus wrote: > > On Wed, 22 Jan 1997 gippolit@ccsmtp2.eccs.com wrote: > > =) How do I change my root shell > =) > =) > You don't want to do this. Login as a regular user and su to root > instead, it will keep the original user's shell (assuming you don't use > the -l option) > The reason for this: > Assume you change root's shell to /usr/local/bin/tcsh, then later on, > something breaks in your rc, /usr won't be mounted and root won't have a > shell. And even if you copy the tcsh or whatever over to /bin, it is probably dynamically linked and needs the libraries in /usr/lib to run. The only way to do it is compile/link your own shell so you know it is statically linked, copy this to /bin and then change the password file to point to the new shell. Of course then you stand a fair chance of breaking a critical shell script somewhere. Much better to use su -m Ron