How to Reset Forgotten Root Password of Redhat / Fedora / Centos
1.Boot Computer / virtual machine and Interrupt while booting by hitting ‘arrow‘ keys or “space bar“.
2. When you see the above screen, type ‘e’ , it will take you to the below screen .
3. Now using the down arrow key select ‘kernel /vmlinuz-…. …….. and type ‘e’ .
4. Now delete / backspace ‘rhgb quiet’ and type ‘ 1’ . hit enter , this will change runlevel to single user mode.
5. Type passwd at the prompt .
6. This will help you to reset the passwd .
7. Provide the new password and retype new password, hit enter . You will get a success message . Now you are ready with the password . Restart the computer and try login.