AWS Linux 2 - root account is locked.
See original GitHub issueHello,
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:
- Created 5 years ago
- Comments:13
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
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…any update on this?