Bug 1763160 - When root user account is locked, allow rescue/emergency login for admin users
Summary: When root user account is locked, allow rescue/emergency login for admin users
Keywords:
Status: CLOSED EOL
Alias: None
Product: Fedora
Classification: Fedora
Component: anaconda
Version: 32
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Anaconda Maintenance Team
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-10-18 11:27 UTC by Marcos Mello
Modified: 2021-12-10 11:55 UTC (History)
12 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2021-05-25 15:09:04 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Marcos Mello 2019-10-18 11:27:13 UTC
See this systemd commit:

https://github.com/systemd/systemd/commit/33eb44fe4a8d7971b5614bc4c2d90f8d91cce66c

When we lock root account during install, target system's rescue and emergency shells are useless!

/etc/systemd/system/{emergency.service.d,rescue.service.d}/anaconda-sulogin-force.conf
(or maybe in /usr/lib/systemd/system)

with

[Service]
Environment=SYSTEMD_SULOGIN_FORCE=yes

allows normal users login as root (without password prompt).

I do not know all security implications, but IMHO is better than having a broken system and cannot fix it via rescue/emergency shell...

Comment 1 Martin Kolman 2019-10-21 17:39:52 UTC
(In reply to Marcos Mello from comment #0)
> See this systemd commit:
> 
> https://github.com/systemd/systemd/commit/
> 33eb44fe4a8d7971b5614bc4c2d90f8d91cce66c
> 
> When we lock root account during install, target system's rescue and
> emergency shells are useless!
By this do you mean the "lock root account" checkbox ?

Well, at least thas is a conscious decision by the user who should
be aware of the possible drawbacks.

I think in such a case, one should setup a normal user with admin priviledges
or is that broken as well ? eq. you can't login with admin user in the rescue shell ?

> 
> /etc/systemd/system/{emergency.service.d,rescue.service.d}/anaconda-sulogin-
> force.conf
> (or maybe in /usr/lib/systemd/system)
> 
> with
> 
> [Service]
> Environment=SYSTEMD_SULOGIN_FORCE=yes
> 
> allows normal users login as root (without password prompt).
> 
> I do not know all security implications, 
I would be kida afraid to enable something like this before verifying what the full impact of the
change is. I don't think we want to give every user root privileges by accident or something similar.

>but IMHO is better than having a
> broken system and cannot fix it via rescue/emergency shell...
Worst case I think you can always use rescue via the installation media, right ?

Comment 2 Marcos Mello 2019-10-21 17:57:09 UTC
(In reply to Martin Kolman from comment #1)
> (In reply to Marcos Mello from comment #0)
> > See this systemd commit:
> > 
> > https://github.com/systemd/systemd/commit/
> > 33eb44fe4a8d7971b5614bc4c2d90f8d91cce66c
> > 
> > When we lock root account during install, target system's rescue and
> > emergency shells are useless!
> By this do you mean the "lock root account" checkbox ?

Yes.

> 
> Well, at least thas is a conscious decision by the user who should
> be aware of the possible drawbacks.
> 
> I think in such a case, one should setup a normal user with admin priviledges
> or is that broken as well ? eq. you can't login with admin user in the
> rescue shell ?

It does not work, even if the user is a wheel group member. sulogin says:

Cannot open access to console, the root account is locked.
See sulogin(8) man page for more details.

Press Enter to continue.

(then systemd keeps loading multi-user.target)

> 
> > 
> > /etc/systemd/system/{emergency.service.d,rescue.service.d}/anaconda-sulogin-
> > force.conf
> > (or maybe in /usr/lib/systemd/system)
> > 
> > with
> > 
> > [Service]
> > Environment=SYSTEMD_SULOGIN_FORCE=yes
> > 
> > allows normal users login as root (without password prompt).
> > 
> > I do not know all security implications, 
> I would be kida afraid to enable something like this before verifying what
> the full impact of the
> change is. I don't think we want to give every user root privileges by
> accident or something similar.
> 

Yes. sulogin should probably allow wheel group members login in this case.

> >but IMHO is better than having a
> > broken system and cannot fix it via rescue/emergency shell...
> Worst case I think you can always use rescue via the installation media,
> right ?

Sure...

Comment 3 Martin Kolman 2019-10-21 18:05:43 UTC
(In reply to Marcos Mello from comment #2)
> (In reply to Martin Kolman from comment #1)
> > (In reply to Marcos Mello from comment #0)
> > > See this systemd commit:
> > > 
> > > https://github.com/systemd/systemd/commit/
> > > 33eb44fe4a8d7971b5614bc4c2d90f8d91cce66c
> > > 
> > > When we lock root account during install, target system's rescue and
> > > emergency shells are useless!
> > By this do you mean the "lock root account" checkbox ?
> 
> Yes.
> 
> > 
> > Well, at least thas is a conscious decision by the user who should
> > be aware of the possible drawbacks.
> > 
> > I think in such a case, one should setup a normal user with admin priviledges
> > or is that broken as well ? eq. you can't login with admin user in the
> > rescue shell ?
> 
> It does not work, even if the user is a wheel group member. sulogin says:
> 
> Cannot open access to console, the root account is locked.
> See sulogin(8) man page for more details.
> 
> Press Enter to continue.
> 
> (then systemd keeps loading multi-user.target)
Then that sounds to me like something that should be fixed in the implementation of the rescue
mode available on the installed system (eq. to also let admin users in), than in Anaconda.

> 
> > 
> > > 
> > > /etc/systemd/system/{emergency.service.d,rescue.service.d}/anaconda-sulogin-
> > > force.conf
> > > (or maybe in /usr/lib/systemd/system)
> > > 
> > > with
> > > 
> > > [Service]
> > > Environment=SYSTEMD_SULOGIN_FORCE=yes
> > > 
> > > allows normal users login as root (without password prompt).
> > > 
> > > I do not know all security implications, 
> > I would be kida afraid to enable something like this before verifying what
> > the full impact of the
> > change is. I don't think we want to give every user root privileges by
> > accident or something similar.
> > 
> 
> Yes. sulogin should probably allow wheel group members login in this case.
> 
> > >but IMHO is better than having a
> > > broken system and cannot fix it via rescue/emergency shell...
> > Worst case I think you can always use rescue via the installation media,
> > right ?
> 
> Sure...

Comment 4 Marcos Mello 2019-10-21 18:16:51 UTC
Karel, can sulogin allow admin users (members of wheel/sudo group -- Debian uses sudo for this I think) login? Maybe restrict this behaviour under a new command line option to not break existing setups.

Comment 5 Ben Cotton 2020-02-11 17:50:37 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 32 development cycle.
Changing version to 32.

Comment 6 Fedora Program Management 2021-04-29 15:59:01 UTC
This message is a reminder that Fedora 32 is nearing its end of life.
Fedora will stop maintaining and issuing updates for Fedora 32 on 2021-05-25.
It is Fedora's policy to close all bug reports from releases that are no longer
maintained. At that time this bug will be closed as EOL if it remains open with a
Fedora 'version' of '32'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 32 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 7 gm11 2021-05-24 13:21:29 UTC
Cannot enter to rescue mode even root is non locked. This bug is still exist and tested with Fedora 34 fresh install.

Other thing that I missed, rescue mode is not available in install media's boot menu!

Comment 8 Ben Cotton 2021-05-25 15:09:04 UTC
Fedora 32 changed to end-of-life (EOL) status on 2021-05-25. Fedora 32 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.

Comment 9 Vladimír Slávik 2021-12-10 11:55:15 UTC
This might help, once implemented? https://fedoraproject.org/wiki/Changes/FixRescueMode


Note You need to log in before you can comment on or make changes to this bug.