Subject: shell

From: Fini Fpv <[email-masked]>
Date: Thu, 25 Aug 2022 18:03:16 +0300

I used the libuser package and I accidentally entered an incorrect shell so
now when I try to login to root I get an error and I can't do anything. Is
there a fix or do I need to completely reinstall the os?

---

From: Unicorn <[email-masked]>
Date: Thu, 25 Aug 2022 15:15:15 +0000 (UTC)

25 Aug 2022 17:04:06 Fini Fpv <[email-masked]>:

> I used the libuser package and I accidentally entered an incorrect 
> shell so now when I try to login to root I get an error and I 
> can't do anything. Is there a fix or do I need to completely reinstall 
> the os?

Hello,

I have run into a similar situation, I suggest the following instead of 
re-installing:
Run Alpine from a USB stick, mount the partition from there and edit the 
file. It also works with encrypted partitions or even ZFS or even an 
encrypted ZFS partition as in my case, though it was admittedly a bit 
more of a pain since you have to install some prerequisites on the live 
USB and go through the unlock process for encrypted partitions.

Hope that helps!

Best,
Edin

---

From: Paul Zillmann <[email-masked]>
Date: Fri, 26 Aug 2022 21:52:08 +0200

You can always boot into the single user mode / rescue mode.
There should be an option in the bootloader.
If not append "single" and maybe `init=/bin/ash` to your kernel 
arguments temporarily.

Once booted in there you type in `lchsh root` and choose `/bin/ash` for 
your default shell.
After a reboot everything should be in working order again.

- Paul