Subject: Re: root shell
To: Dave Huang <khym@azeotrope.org>
From: Peter Seebach <seebs@plethora.net>
List: netbsd-help
Date: 03/22/2006 23:31:34
In message <20060323042258.GJ16528@azeotrope.org>, Dave Huang writes:
>On Wed, Mar 22, 2006 at 10:08:18PM -0600, Peter Seebach wrote:
>> In message <57704.127.0.0.1.1143086361.squirrel@www.88thstreet.com>, "radhika" 
>> writes:
>> >I tried it and get this message:
>> >>su root bash
>> >>Password:
>> >>sh: Can't open bash
>> 
>> Do you have bash installed?
>
>Isn't it
>
>su root -c bash

ARGH!

You are of course correct.  Sort of.  See, the "-c bash" isn't really a
su argument; it's being passed to the shell.

On consideration, it's obvious that this has to be the case, because otherwise
you'd be able to override an account's shell (say, an account that
intentionally has nologin as a shell).

-s