Cannot open access to console, the root account is locked on parrotOS
1
vote
1
answer
5041
views
My parrotOS won’t boot, I didn’t change anything major on my system before this issue happened. I had nno issues restarting the system previously. I’m on parrotOS 5.2.
My fstab looks fine and I did not edit it before this issue happened.
Now when I start the computer I get an error in emergency mode:
>
>
> Cannot open access to console, the root account is locked. See
> sulogin(8) man page for more details.
Pushing any key just repeats the message, the same thing happens in recovery mode.
I have tried editing fstab(taking out swap and non essential drives) and editing the rescue.service file to try and boot sulogin —force,) but that didn’t work. I’ve also run fsck that returned 0(no errors).
This is what I tried in the rescue.service
ExecStart=-/bin/sh -c "/sbin/sulogin --force; /bin/systemctl --job-mode=fail --no-block default"
I think this is related to a Debian bug - https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=802211
I found the following documentation but don’t really know what to do with it, how do I set the environment variable $SYSTEMD_SULOGIN_FORCE=1 ?
> systemd-sulogin-shell:
> * $SYSTEMD_SULOGIN_FORCE=1 — This skips asking for the root password if the root password is not available (such as when the root account
> is locked). See sulogin(8) for more details.
>
> 5.2.3. The rescue boot option is unusable without a root password With the implementation of sulogin used since buster, booting with
> the rescue option always requires the root password. If one has not
> been set, this makes the rescue mode effectively unusable. However it
> is still possible to boot using the kernel
> parameter init=/sbin/sulogin --force To configure systemd to do the
> equivalent of this whenever it boots into rescue mode (also known as
> single mode: see systemd(1)), run sudo systemctl edit
> rescue.service and create a file saying just: [Service]
> Environment=SYSTEMD_SULOGIN_FORCE=1
> It might also (or instead) be useful to do this for the emergency.service unit, which is started automatically in the case
> of certain errors (see systemd.special(7)), or if emergency is added
> to the kernel command line (e.g. if the system can't be recovered by
> using the rescue mode). For background and a discussion on the
> security implications see #802211.
Asked by mb0x88
(11 rep)
Mar 13, 2023, 08:01 PM
Last activity: May 31, 2024, 09:05 AM
Last activity: May 31, 2024, 09:05 AM