pkg_delete bash, logged out by accident, can't ssh back in (not good)

Polytropon freebsd at edvax.de
Sat Sep 27 04:14:25 UTC 2014


On Fri, 26 Sep 2014 17:14:21 -0400, firmdog at gmail.com wrote:
> Oh boy. I have only 2 accounts on this box. Root and one other
> account. Both use bash as default.

This why you (1st) don't change root's shell, and (2nd)
introduce toor (also a UID 0 user) with a custom shell
if you don't want csh as the default dialog shell. Using
a non-system shell as a mandatory login shell often isn't
a good idea if you don't have a "clever" failsave mechanism
(for example an "emergency user" which has sufficient
permissions to repair things when neccessary, but doesn't
depend on 3rd party software at all). Still there are many
users who state that "you simply don't change root's shell,
and if you feel root should require bash, you're obviously
doing something wrong." ;-)



> I am completely locked out of this box on the command line?

No, you could still start the box in single user mode (with
a forced reboot) and use the maintenance shell to change
the settings for the two users. After accepting /bin/sh
as the emergency shell, use "chsh root" and "chsh <otheruser>"
to set /bin/csh as the login shell. Then resume booting
by typing "exit". From now on, you should be able to login
again.


-- 
Polytropon
Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...


More information about the freebsd-questions mailing list