Locked out - need a little help (caution: n00b meter on high!)
Oliver Fromme
check+j3bc3z00rsdgkpr8 at fromme.com
Tue Aug 1 03:49:50 PDT 2006
Gergo Szakal wrote:
> Yeah, I was stupid. I have set the default shell to /usr/pkg/bin/bash
> and started an upgrade of packages in the evening which has removed bash
> as well, obviously. All would have been good if DragonFly didn't spit
> out some race error (v 1.5.4 yet, was just about to start
> buildworld/buildkernel for 1.6.0, of course I cannot report it :-P)
> making the build processes fail somewhere, leaving me with no bash
> installed but bash as default shell for my root account and regular
> account as well.
I recommend to _not_ change root's login shell. Never ever.
There's no reason to change it: Normally you don't login as
root anyway, but you login as normal user. Then you can use
"su -m" to become root, and the -m flag tells su to use your
user's login shell as the root shell.
That's especially useful if several admins work on a machine
as root. Most probably they don't all use the same shell.
One might prefer tchs, the orther bash, and yet another one
zsh. Using the "su -m" method, each of them will get his
favourite shell when working as root.
> If I follow the instructions at
> http://www.freebsd.org/doc/en_US.ISO8859-1/books/faq/admin.html#FORGOT-ROOT-PW
>
> , then when I chsh, vi does not display things properly
Maybe $TERM set incorrectly, which can happen when you're
logged in remotely in single user mode. Set TERM to an
appropriate value (e.g. "vt100"), and vi will work.
Otherwise use ed(1). It even works with dumb terminals or
no $TERM at all. Using ed(1) isn't difficult, especially
if you only need to replace a single line in a config file.
Every admin should know how to do that. :-)
As far as chsh is concerned, see the -s option (*hint*).
By the way, when booting into single user mode, the login
shell is ignored. You will be asked for the shell, and
/bin/sh is the default, so there shouldn't be a problem.
Best regards
Oliver
--
Oliver Fromme, secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing
Dienstleistungen mit Schwerpunkt FreeBSD: http://www.secnetix.de/bsd
Any opinions expressed in this message may be personal to the author
and may not necessarily reflect the opinions of secnetix in any way.
More information about the Users
mailing list