Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

"Cannot open access to console. Root account is locked"

Linux Kernel, Network, and Services configuration.
Post Reply
Message
Author
User avatar
f.r3d
Posts: 75
Joined: 2016-07-28 16:39
Location: France
Has thanked: 4 times

"Cannot open access to console. Root account is locked"

#1 Post by f.r3d »

Hello everyone,

So today my Debian totally froze (yes, it can happen, even to Debian, so don't forget to backup!) so I abruptly shut it down by pressing the power button. I restarted the computer, I entered the passphrase for my full disk encryption but then I could not login because of this error message (before the login stage, inside the tty)

Code: Select all

Cannot open access to console. Root account is locked
It tells you to press Enter or Ctrl + D to continue but none of them work. The same message keeps showing. At this point I cannot login. Recovery mode does not work either because it requires root to be unlocked. The only possibility is to use a live usb and use recovery mode.

I was in a hurry to use my computer so the "fastest" way to use my laptop again was by reinstalling the system. Later I read about this and I was wondering if this could have been the solution.

There is no root account installed on my system. I only use sudo.

I abruptly shutdown my system again for testing and it did create the same error.

What do you think ?

I'm afraid that if it only requires an abrupt shutdown to brick the system, I should be prepared to fix it in case it happens again (and it probably will).

EDIT : I tried to abruptly shutdown a VM but it did not create the same error...
Last edited by f.r3d on 2017-11-17 15:33, edited 1 time in total.
Debian 11 Gnome 64bit
Thinkpad T460
4X Intel Core i7-6600U / 8GB Ram / Intel HD Graphics 520 / 256GB SSD /

User avatar
pylkko
Posts: 1802
Joined: 2014-11-06 19:02

Re: "Cannot open access to console. Root account is locked"

#2 Post by pylkko »

The abrupt shutdown might at times not cause any problems, but at other times you might corrupt files. It is not a deterministic kind of thing in the sense that every single non-clean power down would always cause problems or not. Other things may also cause normal boot to fail, and the kernel has a mode called single-use mode which can be used for trouble shooting.

I think what is happening in your case is that you are trying to use sulogin while the root account is disabled. Perhaps configuring this in your emergency.service could help. This is a service that is run if boot reaches emergency.target i.e fails. You can enter emergency with

Code: Select all

systemctl rescue
to test out the configurations.

User avatar
f.r3d
Posts: 75
Joined: 2016-07-28 16:39
Location: France
Has thanked: 4 times

Re: "Cannot open access to console. Root account is locked"

#3 Post by f.r3d »

OK thank you for your answer! I know a thing or two about Debian but I am not that "fluent" so you will have to be a bit more explicit, please...
Debian 11 Gnome 64bit
Thinkpad T460
4X Intel Core i7-6600U / 8GB Ram / Intel HD Graphics 520 / 256GB SSD /

User avatar
f.r3d
Posts: 75
Joined: 2016-07-28 16:39
Location: France
Has thanked: 4 times

Re: "Cannot open access to console. Root account is locked"

#4 Post by f.r3d »

So I ran

Code: Select all

systemctl rescue
from the tty and the same error showed up.

Here is a picture Image
This is the same message that showed up on my laptop.
Debian 11 Gnome 64bit
Thinkpad T460
4X Intel Core i7-6600U / 8GB Ram / Intel HD Graphics 520 / 256GB SSD /

Bulkley
Posts: 6383
Joined: 2006-02-11 18:35
Has thanked: 2 times
Been thanked: 39 times

Re: "Cannot open access to console. Root account is locked"

#5 Post by Bulkley »

There is no root account installed on my system.
Really? I suppose it's possible but I thought Sudo was just a way to allow users limited root access.

Anyway, during boot does it give you a grub menu? If so do you have a choice of a safe boot?

User avatar
f.r3d
Posts: 75
Joined: 2016-07-28 16:39
Location: France
Has thanked: 4 times

Re: "Cannot open access to console. Root account is locked"

#6 Post by f.r3d »

What I mean by "there is no root account on my system" is that during regular installation I give no password to root so that I can use sudo.
Grub works fine. The problem is that I could not reach the login screen and I was prompted the error message previously shown.
Debian 11 Gnome 64bit
Thinkpad T460
4X Intel Core i7-6600U / 8GB Ram / Intel HD Graphics 520 / 256GB SSD /

Bulkley
Posts: 6383
Joined: 2006-02-11 18:35
Has thanked: 2 times
Been thanked: 39 times

Re: "Cannot open access to console. Root account is locked"

#7 Post by Bulkley »

f.r3d wrote:What I mean by "there is no root account on my system" is that during regular installation I give no password to root so that I can use sudo.
That's unfortunate. What you need is a live-CD or USB that you can boot up with to do repairs. Even getting a look at it helps a lot. I have an old Mint 9 that I use for that. There are several live repair distros available. It would be worth your while to have one in your desk drawer.

BTW, freeze ups are often caused by hardware problems. If so, it will come back. Intermittent freeze ups are difficult to isolate so keep notes.

User avatar
f.r3d
Posts: 75
Joined: 2016-07-28 16:39
Location: France
Has thanked: 4 times

Re: "Cannot open access to console. Root account is locked"

#8 Post by f.r3d »

The netinstall has a rescue mode. So with the netinstall, what do I do? Do I simply chroot and "systemctl rescue"?
Debian 11 Gnome 64bit
Thinkpad T460
4X Intel Core i7-6600U / 8GB Ram / Intel HD Graphics 520 / 256GB SSD /

User avatar
pylkko
Posts: 1802
Joined: 2014-11-06 19:02

Re: "Cannot open access to console. Root account is locked"

#9 Post by pylkko »

You posted an error message, a photo that you took with a phone it appears. In that error message, it tells you to read the man page of sulogin. You should read.

Single user mode or rescue mode is a mode that you can enter with systemcl rescue, if you want. It is also what hapens when your boot fails. Therefore, writing that command will not "fix" anything. You can use it to test changes that you made to configuration, however.

However, there is a service file which does everything that needs to be done whenever you enter rescue mode (see my earlier post). One option is to change that service so that you can use rescue without password, or something else similar. But it is up to you how you want to do it, perhaps you don't want to allow rescue mode without a password (after all you have encryption for a reason, but maybe you can configure it some other way. Maybe you want to put root back into use? who knows, decide what you want and try to do it.) I have never done it myself, so I cannot "be any more explicit".

User avatar
f.r3d
Posts: 75
Joined: 2016-07-28 16:39
Location: France
Has thanked: 4 times

Re: "Cannot open access to console. Root account is locked"

#10 Post by f.r3d »

My bad, I should have mentioned that the first picture is not a picture taken from my laptop. It is a picture I found on google image that matched my error message.

I already read the man sulogin but I did not know what to do afterwards...

I will enquire about "systemctl rescue".
Debian 11 Gnome 64bit
Thinkpad T460
4X Intel Core i7-6600U / 8GB Ram / Intel HD Graphics 520 / 256GB SSD /

User avatar
debiman
Posts: 3063
Joined: 2013-03-12 07:18

Re: "Cannot open access to console. Root account is locked"

#11 Post by debiman »

Bulkley wrote:freeze ups are often caused by hardware problems.
looking at op's other threads, i think a severe case of pebkac is more likely at this point.
no offense, but it is clear that op is regularly taking bites that are larger than his/her mouth. esp. the full disk encryption - might be relevant?

User avatar
f.r3d
Posts: 75
Joined: 2016-07-28 16:39
Location: France
Has thanked: 4 times

Re: "Cannot open access to console. Root account is locked"

#12 Post by f.r3d »

@debiman Hum, I did not understand anything you said... And I repeat what I said previously, the original screen capture (which I deleted) was not from my computer. Sorry for the misunderstanding.
Debian 11 Gnome 64bit
Thinkpad T460
4X Intel Core i7-6600U / 8GB Ram / Intel HD Graphics 520 / 256GB SSD /

Post Reply