cancel
Showing results for 
Search instead for 
Did you mean: 
TudorRaduta
Community Manager
Community Manager
  • 43 Views

"Oh no..." moment: Let's reset the root password

Monday Challenge: You're Locked Out!

Welcome back, everyone! Let's kick off the week with a hands-on challenge that every sysadmin should know: how to recover access when you're completely locked out of a system.

This is part of our "Mission & Map" series, focusing on a critical admin skill: interrupting the boot process to regain control of a system.

It may feel like a “break-in,” but it’s actually a recovery essential for any Linux administrator.

The Mission

Learn the exact, step-by-step procedure to reset the root password on a system when locked out safely, without breaking SELinux. You’ll use GRUB, remount, and recovery techniques used in real-world sysadmin scenarios.

The Map:

This isn’t something you’ll find in a man page. The most reliable guide is the official Red Hat documentation — it’s exactly what you’d review before performing this in production.

Resource: RHEL 9 Docs: Changing and resetting the root password

Your Challenge:

Scenario: You arrive on-site to find that no one remembers the root password for a critical RHEL 9 system. You have physical access but no credentials. Your job: regain control safely. Post the commands and steps you’d take below!

  1. Step 1: When rebooting, what key do you press at the GRUB menu to edit the boot parameters?
  2. Step 2: While editing the linux line, what argument do you add to interrupt the boot process and get a root shell?
  3. Step 3: The system boots to a shell, but the root filesystem is read-only. What’s the first command to remount it as read-write?
  4. Step 4: What command do you run to access the system’s actual root directory (not the temporary one)?
  5. Step 5: Now that you’re in, what command changes the root password?
  6. Step 6: The critical one! What full command must you run before rebooting so SELinux relabels the /etc/shadow file correctly?
  • Bonus Question: What happens if you forget Step 6? Why won’t the system boot properly afterward?

Let’s see your recovery steps! The best answers will help others master one of th essential Linux admin skills!

Labels (1)
0 Kudos
0 Replies
Join the discussion
You must log in to join this conversation.