heavy_mental
Posts: 2
Joined: Wed Jun 28, 2017 10:37 pm

"Cannot open access to console. The root account is locked see sulogin(8) man page for more details."

Thu Feb 01, 2018 11:08 am

Hi,

I keep getting this error most of the time during boot. It pauses the booting waiting for me to press enter, so it's kinda annoying. Yet after I press it everything loads fine. Any ideas?

B.Goode
Posts: 6363
Joined: Mon Sep 01, 2014 4:03 pm
Location: UK

Re: "Cannot open access to console. The root account is locked see sulogin(8) man page for more details."

Thu Feb 01, 2018 11:27 am

Well it's not 'normal' or expected, or something that everyone sees...

So what is the history or background to this?

What version of Raspbian are you running on your RPi? What modifications to its configuration have you made?

Have you considered installing a fresh version of the current Raspbian Stretch Operating System onto a spare microSD card to see if the problem is reproducible?

heavy_mental
Posts: 2
Joined: Wed Jun 28, 2017 10:37 pm

Re: "Cannot open access to console. The root account is locked see sulogin(8) man page for more details."

Thu Feb 01, 2018 12:50 pm

This is almost untouched new stretch. Had this error before and I think it may be related to www.waveshare.com/wiki/3.5inch_RPi_LCD_(A) . Only other thing I installed is https://pi-hole.net/ but that one worked normally before.

dulluhan
Posts: 1
Joined: Sat Feb 03, 2018 6:09 pm

Re: "Cannot open access to console. The root account is locked see sulogin(8) man page for more details."

Sat Feb 03, 2018 6:10 pm

Had the same problem after setting up the screen. But it was not immediate, seemed to happen a few reboots later, could be other things I've been doing on it. But, I do also notice the problem after setting up the screen

epoch1970
Posts: 1946
Joined: Thu May 05, 2016 9:33 am
Location: Paris, France

Re: "Cannot open access to console. The root account is locked see sulogin(8) man page for more details."

Sat Feb 03, 2018 7:10 pm

I've seen someone in the French forum having the same issue, he had added a touchscreen, too.
Unfortunately he reinstalled Stretch and did not try to search further. Reinstall seems to have solved the issue for him.

I would suspect something is wrong with the "console=" statement(s) you people have in /etc/cmdline.txt.
"S'il n'y a pas de solution, c'est qu'il n'y a pas de problème." Les Shadoks, J. Rouxel

mmarcon
Posts: 1
Joined: Wed Feb 21, 2018 10:31 pm

Re: "Cannot open access to console. The root account is locked see sulogin(8) man page for more details."

Wed Feb 21, 2018 10:35 pm

Same is happening to me (Rasperry Pi Zero W). The first time the problem went away with a reboot, but now it's unfortunately stuck. I also installed the drivers for the waveshare touch screen.

Problem is, I have no keyboard to connect to the pi, I was lucky enough to make everything work completely in headless mode. I guess I'll have to get a microUSB adapter and connect a keyboard.

WheelingWizard
Posts: 1
Joined: Sat Mar 17, 2018 2:34 pm

Re: "Cannot open access to console. The root account is locked see sulogin(8) man page for more details."

Sat Mar 17, 2018 2:39 pm

I noted the same issue on two different Raspberry Pi 2 devices. I loaded a fresh copy of 2018-03-13-raspbian-stretch. Initial operation was correct. After updating and reboot; system halts on startup with "cannot open access to console" & "root account is locked". With a USB keyboard, select Enter key and startup proceeds. I reloaded an earlier version of Stretch (2017-11-29-raspbian-stretch) on one of the Raspberry Pi 2 devices. The startup error did not occur. However, after I ran sudo apt-get upgrade - the same problem manifested.

mikeys4u
Posts: 1
Joined: Thu Jan 01, 2015 11:07 pm

Re: "Cannot open access to console. The root account is locked see sulogin(8) man page for more details."

Tue Mar 20, 2018 2:01 am

Just got this error message and the last thing I done was to change my password, from the usual raspberry to something else.
Rebooted and this came up....
It must be login related....
How do I reset this?

janet
Posts: 1
Joined: Sun Mar 25, 2018 2:59 pm

Re: "Cannot open access to console. The root account is locked see sulogin(8) man page for more details."

Sun Mar 25, 2018 3:02 pm

I managed to stop this by renaming sulogin (dogy ik but it fixed it).

sudo mv /sbin/sulogin /sbin/sulogin.bak



Good luck

MrBrown666
Posts: 4
Joined: Mon Mar 26, 2018 8:23 pm

Re: "Cannot open access to console. The root account is locked see sulogin(8) man page for more details."

Mon Mar 26, 2018 9:07 pm

I just ran into the same issue after setting up my Octoprint with a touchscreen. I ended up restarting from scratch, but this time pulled an image while everything was still working. Seems like I can replicate this error whenever I do a hard shutdown (aka unplug it). Yes, I know this isn't how you're supposed to turn it of , but hey this might still happen when the power goes out.

After some research I stumbled upon this: https://bugs.debian.org/cgi-bin/bugrepo ... bug=789950
which led me to this commit: https://git.kernel.org/pub/scm/utils/ut ... 72461aa254

This commit is a few years old and Idon't know if I understood all of this, but I think somewhere on the first site they described how something like a corrupted fs (like after a hard shutdown) might trigger this.
And on the second site we can see part of the sulogin code that describes this the exact error message we are having. The description suggests that sulogin was changed to require "--force" to start a root shell when a locked root account is detected.

Of course now that i wanted to test my approach, I cannot get the error to show up again...

But here is what I would try:

sudo nano /etc/inittab
find the line
"~~:S:wait:/sbin/sulogin"
and change it to
"~~:S:wait:/sbin/sulogin --force"

Pls let me know if this fixes it.

MrBrown666
Posts: 4
Joined: Mon Mar 26, 2018 8:23 pm

Re: "Cannot open access to console. The root account is locked see sulogin(8) man page for more details."

Mon Mar 26, 2018 9:15 pm

EDIT: sry, double post... guess i'm a noob :oops:
Last edited by MrBrown666 on Tue Mar 27, 2018 6:54 pm, edited 1 time in total.

User avatar
DougieLawson
Posts: 33630
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website

Re: "Cannot open access to console. The root account is locked see sulogin(8) man page for more details."

Tue Mar 27, 2018 12:32 am

/etc/inittab does NOT exist on systemd systems like Raspbian Stretch. The last Raspbian version with an inittab was Wheezy.
Microprocessor, Raspberry Pi & Arduino Hacker
Mainframe database troubleshooter
MQTT Evangelist
Twitter: @DougieLawson

2012-18: 1B*5, 2B*2, B+, A+, Z, ZW, 3Bs*3, 3B+

Any DMs sent on Twitter will be answered next month.

MrBrown666
Posts: 4
Joined: Mon Mar 26, 2018 8:23 pm

Re: "Cannot open access to console. The root account is locked see sulogin(8) man page for more details."

Tue Mar 27, 2018 8:13 pm

Well, this was helpfull... :roll:

But it DOES exist:
inittab.JPG
inittab.JPG (43.53 KiB) Viewed 7118 times
This is on a 3B+, so i had hardly any other choice than the newest version of Raspbian.

But OK, you're right. I see my error: I'm still kinda new to this and I was confused by inittab still being there ( BTW /etc/init/ does also exist, shouldn't this be gone too?)

So this brings us to /lib/systemd/system/ right?
I see two files mentioning sulogin in there, "emergency.service" and "rescue.service". This seems to correlate with my observation of this error happening when the fs might be corrupted.

I totally get why they added this safety feature, instead of just starting a root shell without password. But on a headless system, waiting for the user to press enter might not be the best idea.

User avatar
DougieLawson
Posts: 33630
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website

Re: "Cannot open access to console. The root account is locked see sulogin(8) man page for more details."

Tue Mar 27, 2018 10:15 pm

You are NOT running Stretch. /etc/inittab does NOT exist on DebIan Stretch or Raspbian Stretch. So everything you've read about systemd is probably null and void.

Start by looking at /etc/os-release and/or /etc/lsb-release (which ever of those two exists).
Microprocessor, Raspberry Pi & Arduino Hacker
Mainframe database troubleshooter
MQTT Evangelist
Twitter: @DougieLawson

2012-18: 1B*5, 2B*2, B+, A+, Z, ZW, 3Bs*3, 3B+

Any DMs sent on Twitter will be answered next month.

MrBrown666
Posts: 4
Joined: Mon Mar 26, 2018 8:23 pm

Re: "Cannot open access to console. The root account is locked see sulogin(8) man page for more details."

Tue Mar 27, 2018 10:28 pm

here it is
stretch.JPG
stretch.JPG (41.94 KiB) Viewed 7090 times

can we now finally get back to the original issue instead of having a slapfight on whether these files exist my system or not?

User avatar
DougieLawson
Posts: 33630
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website

Re: "Cannot open access to console. The root account is locked see sulogin(8) man page for more details."

Wed Mar 28, 2018 12:16 am

It's not Devuan is it?

Try creating a fresh new SDCard with plain Raspbian 2018-03-13 and see how that works.
Microprocessor, Raspberry Pi & Arduino Hacker
Mainframe database troubleshooter
MQTT Evangelist
Twitter: @DougieLawson

2012-18: 1B*5, 2B*2, B+, A+, Z, ZW, 3Bs*3, 3B+

Any DMs sent on Twitter will be answered next month.

eilex
Posts: 1
Joined: Thu Apr 19, 2018 11:23 am

Re: "Cannot open access to console. The root account is locked see sulogin(8) man page for more details."

Thu Apr 19, 2018 11:37 am

First of all sorry fot my bad english :oops:

I've just got the same error after dist-upgrade and this is how I solved it:

- "cat /etc/fstab" and search for your root partition PARTUUID.

Code: Select all

proc            /proc           proc    defaults          0       0
PARTUUID=3e904640-01  /boot           vfat    defaults          0       2
PARTUUID=3e904640-02  /               ext4    defaults,noatime,usrjquota=quota.user,grpjquota=quota.group,jqfmt=vfsv0  0       1
# a swapfile is not a swap partition, no line here
#   use  dphys-swapfile swap[on|off]  for that
/var/log/ispconfig/httpd/xenopi.dynu.net /var/www/clients/client1/web2/log    none    bind,nobootwait    0 0
(PARTUUID=3e904640-02 in my case)

- "sudo nano /boot/cmdline.txt" check if there is the right root partition or fix it.


(This is what I had before fixing it)

Code: Select all

dwc_otg.lpm_enable=0 console=ttyAMA0,115200 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline rootwait fbcon=map:10 fbcon=font:ProFont6x11 logo.nologo


(This is the working one)

Code: Select all

dwc_otg.lpm_enable=0 console=ttyAMA0,115200 console=tty1 root=PARTUUID=3e904640-02 rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait fbcon=map:10 fbcon=font:ProFont6x11 logo.nologo

This fix only works in case your cmdline root partition is miss configured. If you have "/boot.bak/" dir you are problably having this isue because the old "/boot/" it's left as backup and the dist-upgrade may did'nt setup the root= argument correctly.

I leave here my "/boot.bak/cmdline.txt" just for info, don't use this old one for stretch it does some strange behaviours :roll:

Code: Select all

dwc_otg.lpm_enable=0 console=serial0,115200 console=tty1 root=PARTUUID=3e904640-02 rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait
Hope this helps you ;)

islandmarmot
Posts: 2
Joined: Tue Nov 14, 2017 6:35 pm

Re: "Cannot open access to console. The root account is locked see sulogin(8) man page for more details."

Mon May 07, 2018 3:31 pm

UPDATE: I was wrong this did not fix the issue.

I changed fsck.repair to "NO" and the Pi boots ok.

It appears to me that the boot partition is being checked at startup and as a result systemd times out on reading /boot/cmdline.txt. Hence no console and hence emergency mode.

This is but a theory and I don't really have time to test it.

------------------------------------------------------------------------------------------------------------------------------------------------


Hi - I was having similar problems - had to press a key to continue. I did notice that systemd was complaining about a timeout with a reference to serial. (I cant remember the exact message).

I changed

Code: Select all

dwc_otg.lpm_enable=0 console=serial0,115200 console=tty1 root=PARTUUID=3e904640-02 rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait
to

Code: Select all

dwc_otg.lpm_enable=0 console=ttyAMA0,115200 console=tty1 root=PARTUUID=3e904640-02 rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait
and it booted fine..... I only changed the console to ttyAMA0 .. and yes I checked my PARTUUID's

NOTE: This Pi zero had taken a number of hard resets on a fresh install of stretch lite.

Hope this helps and thanks for posting eilex... :)

juanmasaiz
Posts: 1
Joined: Fri Aug 17, 2018 10:13 am

Re: "Cannot open access to console. The root account is locked see sulogin(8) man page for more details."

Fri Aug 17, 2018 10:20 am

Changing
root=PARTUUID=XXXXXX
and
fsck.repair=no
resolves the problem for me.
Thanks!

Return to “Raspbian”

Who is online

Users browsing this forum: Bing [Bot], Converted and 14 guests