~alpine/users

2 2

shell

Details
Message ID
<CAGcXLMzbjCHiJhz0ShOvqmdMJTxggozThq03ePrvrVcsxNp6dQ@mail.gmail.com>
DKIM signature
missing
Download raw message
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?
Details
Message ID
<67bceff6-465a-44c0-8acd-b66c4d21616d@regrow.earth>
In-Reply-To
<CAGcXLMzbjCHiJhz0ShOvqmdMJTxggozThq03ePrvrVcsxNp6dQ@mail.gmail.com> (view parent)
DKIM signature
missing
Download raw message
25 Aug 2022 17:04:06 Fini Fpv <markusskalenda@gmail.com>:

> 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
Paul Zillmann <p.zillmann@h6g.de>
Details
Message ID
<2cec7e3e-035e-dc6b-b406-7575b51ba46b@h6g.de>
In-Reply-To
<CAGcXLMzbjCHiJhz0ShOvqmdMJTxggozThq03ePrvrVcsxNp6dQ@mail.gmail.com> (view parent)
DKIM signature
missing
Download raw message
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

Am 25.08.22 um 17:03 schrieb Fini Fpv:
> 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?
Reply to thread Export thread (mbox)