systemd/systemd

rescue mode and emergency mode won't work when the root account is locked

Opened this issue · 3 comments

Submission type

  • Bug report

systemd version the issue has been seen with

235 (and many versions before it).

Used distribution

Debian sid (as well as Debian stretch and Debian buster)

In case of bug report: Expected behaviour you didn't see

Rescue mode and emergency mode should give me a shell with root permissions.

In case of bug report: Unexpected behaviour you saw

Rescue mode and emergency mode won't give me any shell. After telling me that the root account is locked, they will only allow me to boot into default mode.

In case of bug report: Steps to reproduce the problem

For rescue mode:

  1. Lock your system's root account, if you haven't already done so.
  2. Reboot to GRUB.
  3. Start rescue mode.

For emergency mode:

  1. Lock your system's root account, if you haven't already done so.
  2. Corrupt your /etc/fstab.
  3. Reboot.

The emergency login prompt is done by sulogin, which is part of either "util-linux" or "shadow" – not a systemd component.

Some further notes:

@grawity And two years ago, util-linux added an option to sulogin specifically for this kind of cases. The defect is that systemd is not using that option.