Q: An ex-employee changed the root password of a critical bare-metal Linux server and left. You have physical access to the server but do not know the password. How do you regain control?
Since physical access is available, the root password can be reset by interrupting the bootloader (GRUB).
#Linux #Linux / SRE — Scenario-Based Interview Questions #L2 #SRE #Systems #Troubleshooting
🎙️ Candidate Opening & Architectural Context
""In an interview, I explain my systematic Linux troubleshooting methodology using Brendan Gregg's USE method. The interviewer is testing: GRUB manipulation, Rescue Mode, `rd.break`.. I structure my answer around systematic triage first, root cause analysis second, and permanent remediation third.""
Advertisement
🛠️ Production Runbook & Step-by-Step Resolution
1️⃣
Initial Diagnostics & Root Cause Analysis
Since physical access is available, the root password can be reset by interrupting the bootloader (GRUB).
- Reboot the server. When the GRUB menu appears, press
eto edit the kernel boot parameters. - Find the line starting with
linuxorlinux16. Appendrd.break(on RHEL/CentOS) orinit=/bin/bash(on Debian/Ubuntu) to the end of that line, and press Ctrl+X to boot. - This drops you into an emergency root shell *before* the system fully mounts or asks for a password.
2️⃣
Remediation & Permanent Safeguards
- Mount the actual root filesystem mathematically with read-write access:
mount -o remount,rw /sysrootandchroot /sysroot. - Run the
passwdcommand to comfortably set a new root password. Exit and reboot.
💡 The Senior SRE Gold Nugget (Key Architectural Takeaway)
"Pro-Tip: Reboot the server. When the GRUB menu appears, press e to edit the kernel boot parameters.."
⚡ 60-Second Elevator Pitch Talking Points
- Reboot the server. When the GRUB menu appears, press e to edit the kernel boot parameters.
- Find the line starting with linux or linux16. Append rd.break (on RHEL/CentOS) or init=/bin/bash ...
- This drops you into an emergency root shell *before* the system fully mounts or asks for a password.
Advertisement