From owner-freebsd-questions@FreeBSD.ORG Fri Dec 24 22:06:27 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 B552216A4CE for ; Fri, 24 Dec 2004 22:06:27 +0000 (GMT) Received: from smtp1.utdallas.edu (smtp1.utdallas.edu [129.110.10.12]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7E6FA43D1D for ; Fri, 24 Dec 2004 22:06:27 +0000 (GMT) (envelope-from pauls@utdallas.edu) Received: from [192.168.2.101] (utdvpn084050.utdallas.edu [129.110.84.50]) by smtp1.utdallas.edu (Postfix) with ESMTP id 7487738933A; Fri, 24 Dec 2004 16:06:26 -0600 (CST) Date: Fri, 24 Dec 2004 16:06:24 -0600 From: Paul Schmehl To: Andy Firman , freebsd-questions@freebsd.org Message-ID: <2147483647.1103904384@[192.168.2.101]> In-Reply-To: <20041224155358.GB15993@akroteq.com> References: <41C6EE24.4080606@vilot.com> <200412202154.iBKLsrt13676@clunix.cl.msu.edu> <20041224155358.GB15993@akroteq.com> X-Mailer: Mulberry/3.0.3 (Mac OS X) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline Subject: Re: bash - superuser X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Paul Schmehl List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Dec 2004 22:06:27 -0000 --On Friday, December 24, 2004 6:53 AM -0900 Andy Firman wrote: > > 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? > Correct. > 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? > Correct. However, there's one more thing you need to know. When you use su, if you type "% su", you become root, but you are using *your* path. If you want to use root's path, type "%su -". That makes you root *with* root's path, and makes things much easier for you. Then just type "% bash" at the prompt, and you are using bash as your shell. The only "gotcha" (if you want to call it that) is that you have to type "% exit" twice to stop being root - once to get out of bash, and the second time to exit your su - session. Paul Schmehl (pauls@utdallas.edu) Adjunct Information Security Officer The University of Texas at Dallas AVIEN Founding Member http://www.utdallas.edu