question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

AWS Linux 2 - root account is locked.

See original GitHub issue

Hello,

been doing some testing on AWS linux 2 LTS and come across an issues that is stopping the image from booting. looks like the root account is getting disabled so this is stopping the init process from finishing to the point where we cant connect, so litter hard to get any more logging info. from the ‘get sys log’ option in EC2 i managed to pull the following :

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

not sure what could be the case, is there any tasks that could be the root case for this ? for info i have the following exclusions

        "extra_arguments": [ "--extra-vars '{\"cis_level_1_exclusions\":[\"6.1.10\",\"6.1.11\",\"6.1.12\",\"1.3.1\",\"5.4.4\",\"3.6.1\",\"3.6.2\",\"3.6.3 \",\"3.6.4\",\"3.6.5 \",\"3.4.2 \",\"3.4.3\",\"1.1.18\"]}'" ],

Issue Analytics

  • State:open
  • Created 5 years ago
  • Comments:13

github_iconTop GitHub Comments

1reaction
FransUrbocommented, Nov 30, 2020

It seems the Amazon Linux 2 AMI I use as base mounts EFS/NFS mounts to early in the boot process, messing up the rest of it. So the solution was simple, just make sure network mounts is mounted later by adding a _netdev option to the two EFS mount entries. This is actually documented on the https://docs.aws.amazon.com/efs/latest/ug/efs-mount-helper.html page.

Wether that helps anyone else, I don’t know but it was the cause of my root account is locked problems…

1reaction
Rinzler081commented, Jul 17, 2020

any update on this?

Read more comments on GitHub >

github_iconTop Results From Across the Web

"Cannot open access to console, the root account is locked ...
Hi guys Trying to migrate a t2 AL2 instance to t3 and getting the message: "Cannot open access to console, the root account...
Read more >
root locked out of EC2 - Server Fault
Without finding a vulnerability, the only way to gain root access on a Linux machine is to boot into single user mode and...
Read more >
Troubleshoot an EC2 Linux instance in emergency mode
1. Open the Amazon EC2 console. · 2. Choose Instances from the navigation pane, and then select the instance that's in emergency mode....
Read more >
I accidentally locked my linux root user and now I can't login in
Since you are working with an AWS EC2 instance, you really only have one option for recovery: stopping the instance, mounting the EBS...
Read more >
Locked myself out of root account on EC2 Ubuntu instance
Create a new, temporary instance. · Stop the old instance. · Detach the EBS volume from the old instance. · Attach the volume...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found