Scenario Description
The user is locked out of the root account and sudo access is misconfigured. They must regain root access to the machine.
Root Cause
The root password was changed to an unknown value, and the sudoers file has a syntax error preventing the brokenops user from using sudo.
Setup Instructions
- Change root password to a random string.
- Introduce a syntax error in
/etc/sudoers.
Expected Resolution Steps
- Reboot the VM and interrupt the GRUB boot menu.
- Edit the boot parameters to append
init=/bin/bash or rd.break.
- Boot into single-user mode/emergency shell.
- Remount the root filesystem as read-write (
mount -o remount,rw /).
- Run
visudo to fix the sudoers file, or run passwd to reset the root password.
- Reboot normally.
Scenario Description
The user is locked out of the root account and sudo access is misconfigured. They must regain root access to the machine.
Root Cause
The root password was changed to an unknown value, and the sudoers file has a syntax error preventing the
brokenopsuser from usingsudo.Setup Instructions
/etc/sudoers.Expected Resolution Steps
init=/bin/bashorrd.break.mount -o remount,rw /).visudoto fix the sudoers file, or runpasswdto reset the root password.