How to Reset Forgotten Root Password in RHEL/CentOS and Fedora

Download Your Free eBooks NOW - 10 Free Linux eBooks for Administrators

Ravi Saive

Simple Word a Computer Geek and Linux Guru who loves to share tricks and tips on Internet. Most Of My Servers runs on Open Source Platform called Linux.

Receive Your Free Complimentary eBook NOW! -

Download Free Linux eBooks

Advanced Bash-Scripting Guide
Linux Bible
A Newbie's Getting Started Guide to Linux
Ubuntu Linux Toolbox: 1000+ Commands

You may also like...

44 Responses

  1. AShfaq says:

    thanks bro

  2. rajesh says:

    More details on this

    Per Oracle instructions to implement Huge Pages I made the following updates and re-booted:
    /etc/security/limits.conf
    * soft memlock 45298482
    * hard memlock 45298482
    /etc/sysctl.conf
    vm.nr_hugepages = 9219 # calculated with Oracle script

    After reboot, the system is operation, but root login authenticates then fails. We can login as oracle. When try to su, get: can not open session.

    I have booted from disk and went in rescue mode to back out the changes. The changes were backed out, but still cannot login as root.

    • Ravi Saive says:

      @rajesh,
      Seems strange problem, sorry I really don’t have any idea…give me some time to find out solution for you..

  3. rajesh says:

    Hi Ravi,

    I am getting a strange issue. I am not able to login to root using a desired password on SSH / Linux terminal

    The screen gets refreshes and again comes to login prompt . on the other hand i have another user as oracle and through that user I am able to login

    What could be the issue? please suggest the solution. I am using RHEL 5.8

  4. rajinikanth says:

    How to reset forgotten root password without booting……………..

  5. Mohsen Haghighat says:

    It is not necessary to execute all of above steps. After pressing Escape and then ‘a’ (append)

    it is sufficient to type 1 after …_DM with one space , like : rd_NO_DM 1

    and then press Enter

    you are root now and can type passwd ….. enjoy !!!!

  6. Hector says:

    thanks for your help this article help me alot

  7. Rajesh Smart says:

    I want to change username rajesh, instead of giving root help me out:)

  8. Rajesh Smart says:

    It is very simple but very useful & thanks a lot:)
    Regards
    Rajesh

  9. kasun says:

    very helpful information. thanx!

Leave a Reply

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

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

Join Over 70000+ Linux Users
  1. 48590
  2. 2375
  3. 13200

Enter your email to get latest Linux Howto's