CentosFedora

Easy way to reset forgotten root password in CentOS 6.5

In this article we will learn, how to reset forgot root password in CentOS 6.0/6.1/6.2/6.3/6.4/6.5 and Fedora 16/17/18/19/20. To reset the root password we will boot the linux system in Runlevel 1 also known as single user mode.

Reset forgot root password in CentOS 6.1/6.2/6.3/6.4/6.5

To reset forgot root password in CentOS 6.0/6.1/6.2/6.3/6.4/6.5 and Fedora 16/17/18/19/20 follow the given below steps:
Step1: Boot your CentOS linux system and press esc key when you see the message “Press any key to enter the menu

Message on system booting
Message on system booting

Step 2: Now, select your operating system if it is dual/multiple boot and presa to modify kernel argument. If you cancel pressESC‘ key.

Boot menu
Boot menu[
[ads]

Step 3:  In kernel configuration, we have 2 methods to change to single mode. 1 we can use a number “1″, 2 we can use character “S”. Enter after done.

Appened 1 at the GRUB
Opened 1 at the GRUB

Step 4:  After reboot type ‘passwd command without username and press ‘Enter key in command prompt.

Change root password
Change root password

Step 5: Reboot your system and login using the new password.
Reference: http://wiki.centos.org/TipsAndTricks/ResetRootPassword

 

4 Comments

  1. 1)从启动进入用户维护模式,系统会主动给予root权限的bash接口,然后用passwd修改密码.
    2)以Live CD开机后挂载根目录去修改/etc/shadow.

Leave a Reply

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

CAPTCHA


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

Back to top button