Insecure emergency and single user modes
When accessing single-user mode or emergency mode the user is dropped directly to a root shell. A better approach would be to use sulogin (not default in alpine's busybox) to ask for root password
Example of insecure code:
https://gitlab.alpinelinux.org/alpine/mkinitfs/-/blob/master/initramfs-init.in#L30-L31
I have it working locally and the only "but" is that it will need to add the shadow file (or a shadow file) into the initramfs so sulogin works.
Edited by marderbot