Subject: Re: su: /usr/pkg/bin/bash : No such file or directory
To: None <>
From: Geert Hendrickx <>
List: netbsd-users
Date: 10/03/2005 17:26:21
On Mon, Oct 03, 2005 at 05:02:40PM +0200, Stefan 'Kaishakunin' Schumacher wrote:
> Also sprach Pietro Capriata (
> > after i have installed netbsd 2.0.2 i remove his monitor and controll
> > it with ssh ..  now i have problem ..  when i am as user on it and
> > write su after password it print : su: /usr/pkg/bin/bash : No such file
> > or directory so i can't controll it .... what can i do?
> Boot to single user modus. You'll need a monitor/keyboard attached to the
> machine. At the bootprompt, cancel the countdown with [ESC] key and enter
> "boot -s". The machine will go to singleuser mode and ask for a shell.
> Hit enter to use the default /bin/sh. Now use chsh to alter root's shell
> to a builtin one, like /bin/sh. From now on, root will use Bourne Shell
> and have no problems with su. You can switch to headless mode. In my
> opinion, you should keep /bin/sh as login shell and start bash by hand,
> once su succeeded.

I have the root-shell set to /bin/sh to avoid problems, but I also have
"shell /usr/pkg/bin/zsh" in /root/.screenrc, since screen is the first
think I invoke after su anyway.  This way screen will spawn nice zshells in
new windows, instead of /bin/sh.  You can of course substitute wit bash.