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”
Step 2: Now, select your operating system if it is dual/multiple boot and pres ‘a‘ to modify kernel argument. If you cancel press ‘ESC‘ key.
[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.
Step 4: After reboot type ‘passwd‘ command without username and press ‘Enter‘ key in command prompt.
Step 5: Reboot your system and login using the new password.
Reference: http://wiki.centos.org/TipsAndTricks/ResetRootPassword
1)从启动进入用户维护模式,系统会主动给予root权限的bash接口,然后用passwd修改密码.
2)以Live CD开机后挂载根目录去修改/etc/shadow.
JazakAllah, Thanku so much. It works
It works until you secured your grub and… also forgot your GRUB password XD… #truestory T.T
Thanks for the step, it works but am not able to login after reboot.