Single User Mode: Resetting/Recovering Forgotten Root User Account Password in RHEL/CentOS 7

Best Affordable Linux and WordPress Services For Your Business
Outsource Your Linux and WordPress Project and Get it Promptly Completed Remotely and Delivered Online.

If You Appreciate What We Do Here On TecMint, You Should Consider:

  1. Stay Connected to: Twitter | Facebook | Google Plus
  2. Subscribe to our email updates: Sign Up Now
  3. Get your own self-hosted blog with a Free Domain at ($3.45/month).
  4. Become a Supporter - Make a contribution via PayPal
  5. Support us by purchasing our premium books in PDF format.
  6. Support us by taking our online Linux courses

We are thankful for your never ending support.

RedHat RHCE and RHCSA Certification Book
Linux Foundation LFCS and LFCE Certification Preparation Guide

You may also like...

21 Responses

  1. Rajshekar says:

    it is really good explaining method.
    thanks a lot…

  2. amin alnasra says:

    Thank you so much
    you helped me … my server was down and I wasn’t able to login in root password

    I tried many techniques to recover root password but I failed

    and your topic helped me so that I want to thank you from the deep of my hart <3

  3. Ajay says:

    Very Helpful. Screen shots are awesome ! It saved me …

  4. Radkowski says:

    Procedure works OK. The only one comment.:In grub configuration change:

    root=/dev/mapper/rhel-root ro
    root=/dev/mapper/rhel-root rw

    After boot, root partition will be already mounted as rw. Then follow procedure
    – change password
    – touch relabel file
    – reboot

    • Ravi Saive says:


      Thanks for the tip about grub configuration changes, hope it will helpful to other users..

  5. Paul Stagner says:

    I don’t really reply to these generally but this is very misleading and incorrect from what I really had to do to make the system boot to single user mode

  6. Pete says:

    Okay guys, I need some help here. I have tried the above example several times. All new minimal install vms. Every time I do it I still cant log in. what could I possible be doing wrong. Im using Centos 7. I tried it dmaraid s way as well.

  7. sandeep singh says:

    instead of init=/bin/bash you could also just type single at the end of that line to boot to the single user mode ;-)

  8. HARI says:

    Please post configuring networking using nmcli in RHEL7

  9. Dan says:

    Good thanks for the heads up, we really forget root password and this tutorial will help. Thanks again.

  10. dmaraid says:

    The official training for RHSCA 7 describes the “change root password” procedure as below:

    Append “rd.break” to the kernel command line that starts with linux16 (this will break just before control is handed from the initramfs to the actual system) (sometimes it is needed to delete also everything after “…mapper/rhel-root ro” and append here)

    mount -o remount,rw /sysroot

    chroot /sysroot


    touch /.autorelabel

    “exit” and again “exit” and you are done.

Got something to say? Join the discussion.

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.