NetBSD-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: I finally bricked my NetBSD system



On Thu, Jul 16, 2020 at 10:19:59PM +0200, Jrn Clausen wrote:
> If you actually bricked your root account: boot single user and chsh to
> /bin/sh or /bin/csh.
> 
> I always keep /bin/sh as my root shell and do
> 
> if [ -x /usr/pkg/bin/tcsh ]; then
>         exec /usr/pkg/bin/tcsh
> fi
> 
> in /root/.profile. I know why, and now you do too...
> 

Which works fine right up until you either decide to put /usr/pkg/bin on a remote
filesystem that becomes unavailable or some system problem such as a missing shared
library stops tcsh from running then you understand why this also is not a good
idea.

It would be safer to either create a shell alias so you can save keystrokes when
you log in or use another account with uid 0 as the favoured login.  I set the toor
account shell to bash and use that and leave root's shell as default.
 
-- 
Brett Lymn
--
Sent from my NetBSD device.

"We are were wolves",
"You mean werewolves?",
"No we were wolves, now we are something else entirely",
"Oh"


Home | Main Index | Thread Index | Old Index