Reset Forgotten Root Password Using rd.break (GRUB Method)

Problem Overview

  • Losing the root password prevents administrators from performing critical system maintenance.
  • This commonly happens after long inactivity, team changes, or inheriting systems with unknown credentials.
  • Reinstalling the operating system is not acceptable in production due to data loss and downtime.
  • A safe recovery method is required to regain root access without impacting existing data or services.

Prerequisites

  • Before starting, make sure the following conditions are met:
  • Physical or console access to the system (VM console or server access)
  • Ability to access the GRUB boot menu
  • System uses systemd (RHEL, CentOS, Rocky Linux, AlmaLinux, Fedora)
  • Filesystem is not encrypted

Solution

  • Reboot the system
  • When the GRUB menu appears, Press e to edit the boot parameters

    •                             GRUB version 2.06
       ┌────────────────────────────────────────────────────────────────────────────────┐
       │*Red Hat Enterprise Linux (5.14.0-611.5.1.el9_7.x86_64) 9.7 (Plow)              │
       │ Red Hat Enterprise Linux (0-rescue-ef5669ef42ab466aa4e2e6e9fa8f44c1) 9.7 (>)   │
       │                                                                                │
       │                                                                                │
       │                                                                                │
       │                                                                                │
       │                                                                                │
       └────────────────────────────────────────────────────────────────────────────────┘
           Use the ↑ and ↓ keys to select which entry is highlighted.
           Press enter to boot the selected OS, 'e' to edit the commands
           before booting or 'c' for a command-line.
      
  • Go to the line which starts with linux an press Ctrl+e to go to the end of the line.
    •                             GRUB version 2.06
       ┌────────────────────────────────────────────────────────────────────────────┐
       │load_video                                                                  │
       │set gfxpayload=keep                                                         │
       │insmod gzio                                                                 │
       │linux ($root)/vmlinuz-5.14.0-611.5.1.el9_7.x86_64 root=/dev/mapper/rhel_10-\│
       │root ro crashkernel=1G-2G:192M,2G-64G:256M,64G-:512M resume=/dev/mapper/rhe\│
       │l_10-swap rd.lvm.lv=rhel_10/root rd.lvm.lv=rhel_10/swap rhgb quiet          │
       │initrd ($root)/initramfs-5.14.0-611.5.1.el9_7.x86_64.img $tuned_initrd      │
       │                                                                            │
       │                                                                            │
       └────────────────────────────────────────────────────────────────────────────┘
           Minimum Emacs-like screen editing is supported. TAB lists
           completions. Press Ctrl-x or F10 to boot, Ctrl-c or F2 for
           a command-line or ESC to discard edits and return to the GRUB menu.
      
  • Type rd.break at end of the like, after quiet
    •                             GRUB version 2.06
       ┌────────────────────────────────────────────────────────────────────────────┐
       │load_video                                                                  │
       │set gfxpayload=keep                                                         │
       │insmod gzio                                                                 │
       │linux ($root)/vmlinuz-5.14.0-611.5.1.el9_7.x86_64 root=/dev/mapper/rhel_10-\│
       │root ro crashkernel=1G-2G:192M,2G-64G:256M,64G-:512M resume=/dev/mapper/rhe\│
       │l_10-swap rd.lvm.lv=rhel_10/root rd.lvm.lv=rhel_10/swap rhgb quiet rd.break │
       │initrd ($root)/initramfs-5.14.0-611.5.1.el9_7.x86_64.img $tuned_initrd      │
       │                                                                            │
       │                                                                            │
       └────────────────────────────────────────────────────────────────────────────┘
           Minimum Emacs-like screen editing is supported. TAB lists
           completions. Press Ctrl-x or F10 to boot, Ctrl-c or F2 for
           a command-line or ESC to discard edits and return to the GRUB menu.
      
  • Press Ctrl + X (or F10) to boot
  • The real root filesystem is available at /sysroot but mounted read-only, so remount and change root password
    • Remount /sysroot as read/write.
      • switch_root:/# mount -o remount,rw /sysroot
    • Switch into a chroot jail, where /sysroot is treated as the root of the file-system tree.
      • switch_root:/# chroot /sysroot
    • Validate the current user using the whoami command
      • sh-5.1# whoami
        root
    • Set a new root password.
      • sh-5.1# passwd root
        Changing password for user root.
        New password:
        Retype new password:
        passwd: all authentication tokens updated successfully.
    • Make sure that all unlabeled files, including /etc/shadow at this point, get relabeled during boot.
      • sh-5.1# touch /.autorelabel
    • Type exit twice. The first command exits the chroot jail, and the second command exits the initramfs debug shell.
      • sh-5.1# exit
        exit
        switch_root:/# exit
        logout
  • The system will reboot, relabel all files for SELinux, and then apply the new password. SELinux relabeling may take a few minutes.

Note:

  • This method does not erase data

  • Requires reboot and console access

  • Not applicable to encrypted root filesystems

  • Recommended only for authorized recovery scenarios

Shaik Mohammed Faruk

Software Engineer sharing practical tutorials and insights on Linux, Python, SQL, and modern technologies.

Read more About Me

0 0 votes
Article Rating
guest

61 Comments
Oldest
Newest Most Voted
sv66514y
9 months ago

Okay, sv66514y… that’s quite a name. I wonder what games they have? Let’s see if it’s worth the hype after the name. More details sv66514y.

tx88game
9 months ago

Thinking about trying tx88game. Is it any different from the others? User interface good? Looking for something fresh hopefully. More information tx88game.

winphcasino
9 months ago

Winphcasino… claiming wins already! I’ll investigate. Any big winners out there? Gotta check the odds . winphcasino to see!

rotowirelogin
2 months ago

I was struggling to find a reliable spot until I tried this. The interface is super smooth and easy to navigate. Glad I found rotowirelogin.

pkluckybet7
2 months ago

I felt lucky the moment I joined. The odds are great and the community is very welcoming. Definitely my new favorite spot pkluckybet7

91jililoginapp
2 months ago

Using the app makes everything so much more convenient. I can play anywhere and anytime via 91jililoginapp

ki888phcom
2 months ago

Best platform for local players in my opinion. Everything feels very tailored to what we want. Visit ki888phcom for a great time.

65jililogin
2 months ago

Finally found a site that doesn’t crash every five minutes. The interface is super user-friendly and the payouts feel fair. Highly recommend giving 65jililogin a try if you are into online gaming.

yono101game
2 months ago

Finally found a site that doesn’t crash during peak hours. The graphics are crisp and the gameplay is addictive. You should give yono101game a try if you love online gaming.

uno89login
2 months ago

The login process is seamless and I haven’t encountered any glitches so far. It makes the whole gaming session much more enjoyable. Big thanks to uno89login for the quality service.

titiwinlogin
2 months ago

I was skeptical at first but the withdrawal was processed in minutes. Very reliable service over at titiwinlogin.

pkck888
2 months ago

Really liking the vibe here. The bonuses are generous and the customer support team is actually helpful. pkck888

vn55xin88
1 month ago

I love the daily rewards and the loyalty program. It really keeps things interesting and rewarding for regular players. Cheers to vn55xin88

jilionelogin
1 month ago

I’ve tried a few platforms recently but this one is surprisingly smooth. The login process is quick and I didn’t encounter any lags. Definitely a solid choice for local players. Check out jilionelogin for a great experience.

idmiliarbet
1 month ago

I was skeptical at first but after a few wins I am totally convinced. The withdrawal process is seamless and honest. Check out idmiliarbet.

rs789game
1 month ago

The game selection is massive and the community vibes are great. I’ve met some cool people while playing here. Check out rs789game for some action.

phokjili
1 month ago

I’ve tried a few platforms recently, but this one is definitely my favorite. The games load fast and the payouts are fair. Highly recommend phokjili for anyone looking for some real excitement!

kronwin
1 month ago

I really appreciate how transparent this platform is with their rules. No hidden catches, just pure gaming fun at kronwin.

win96jililogin
1 month ago

Best experience I have had in a long time. The bonuses are generous and the customer support is actually helpful. I am loving the vibes here. Just go to win96jililogin and see for yourself.

vncanohu
1 month ago

The payout speed is impressive and the games are always up to date. Highly recommend this platform to anyone looking for fun. Visit vncanohu today!

brlottus
1 month ago

I love the lottery style games here. It is a great way to unwind after work and maybe win something big. brlottus is my go-to site now.

9999winlogin
1 month ago

Had a massive win last night and the withdrawal process was surprisingly quick. This place is legit. Visit 9999winlogin for a great time

krwinna
1 month ago

The winning streaks I’ve had here are insane. It feels like the RNG is actually fair for once. Cheers to krwinna for the awesome vibes.

nogad88login
1 month ago

Fast loading times and very secure. I feel safe putting my trust in this platform. Go for nogad88login if you want peace of mind.

777zkapk
1 month ago

The user experience is top notch and the rewards are generous. I’ve shared this with my friends and we are all having a blast on 777zkapk.

phpisoking
1 month ago

Best gaming experience I’ve had in a while. The graphics are crisp and the wins feel fair. You should give phpisoking a try if you like excitement.

zb777login
1 month ago

I’ve been looking for a reliable way to access my account and this site is definitely the smoothest. Super fast loading and no glitches. Highly recommend zb777login to everyone.

phjili90
1 month ago

The graphics are top notch and the gameplay is very immersive. It is definitely one of the top choices for gaming in the region. See phjili90

mpocashlinkalternatif
1 month ago

Whenever the main site is down, this alternative link saves the day. Very reliable and keeps me in the game without any interruptions. Use mpocashlinkalternatif.

wwwcasinopluscomph
1 month ago

The game variety here is insane! I love how smooth the interface is on mobile. Highly recommend wwwcasinopluscomph for anyone looking for a thrill.

bddbt88
30 days ago

Really enjoyed the gaming experience here. It feels professional and the graphics are stunning. Can’t wait to see what’s new on bddbt88

krskrillcasino
29 days ago

The deposit and withdrawal process here is a breeze. I love how quickly my funds hit the account. Great experience so far with krskrillcasino.

pkwinpkrapk
29 days ago

The app is lightweight and doesn’t lag even on my old phone. Really impressed with pkwinpkrapk and their customer support.

br345ok
28 days ago

The variety of games here is insane. I never run out of things to try and the customer support is always helpful. br345ok is my go-to spot now.

okbeylogin
28 days ago

Quick and easy login process. I hate it when sites make it hard to enter your account, but okbeylogin keeps it simple and efficient.

idmumu86
28 days ago

Very clean layout and no annoying pop ups. It is refreshing to find a site that focuses on the user experience. Highly suggest idmumu86 to my friends.

ole99link
26 days ago

Straightforward and honest platform. No hidden fees or complicated rules. Just a great place to enjoy some games ole99link

topslot88login
25 days ago

No more login issues like I had on other sites. This portal is seamless and gets me straight to the action. Cheers to topslot88login for keeping it simple.

idrumahmpo
24 days ago

Top notch service and a very professional layout. It feels secure and the support team is actually helpful. Glad I found idrumahmpo

br76fbet
24 days ago

I’ve been looking for a reliable spot to play and this one really delivers. The interface is smooth and the payouts are fast. Definitely checking out br76fbet again tonight!

idbalivegas
24 days ago

The live action here is just incredible. It feels like I am actually in the casino without leaving my couch. Definitely check out idbalivegas.

203pubdownload
23 days ago

Finally found a reliable place to get everything I need. The download speed is top notch and the content is always updated. Visit 203pubdownload now.

phjili65
22 days ago

This site has a great selection of Jili games that actually pay out. I’ve spent a few hours here and the experience has been purely awesome. Check out phjili65.

88korwin
18 days ago

Honestly the best gaming experience I have had in a while. The bonuses are generous and the customer support team is actually helpful. Highly recommended for all players. Visit 88korwin

idpiala88
16 days ago

The customer service here is top notch. I had a small issue with my account and they fixed it in minutes. Great job by idpiala88 for keeping players happy.

8k8ocomlogin
16 days ago

I’ve been looking for a reliable platform and this one really delivers. The login process is super smooth and the games are top-notch. Highly recommend checking out 8k8ocomlogin for a great experience!

phokgameslogin
14 days ago

The graphics are crisp and the gameplay is addictive. I love how easy it is to navigate the site. Give phokgameslogin a try, you won’t regret it.

ph99jl
13 days ago

Really impressed with the customer service here. They helped me resolve my deposit issue in minutes. ph99jl is definitely one of the most trustworthy platforms I have tried.

idgacor777
13 days ago

Finally found a place that actually pays out consistently. The games are fair and the vibe is just right. Highly recommend checking this one out. idgacor777

juanbingo365apk
9 days ago

Bingo nights are way more exciting now that I have this installed. It is very intuitive and easy to navigate even for beginners. Love juanbingo365apk.

Thanks for your interest!

Content for this is getting ready and will be published soon.

61
0
Would love your thoughts, please comment.x
()
x