How to Reset forgotten CentOS 7.X Root Password

This is simplest way to change forgotten CentOS 7 Root Password and this is totally different from CentOS 6

1:- In the boot Grub Menu Press “e” to open edit mode.

2:- When you press “e “this edit window will open and go to the line of linux16

3:- Replace ro with  rw init=/sysroot/bin/sh

4:- Now Press CTRL+X to start Single User Mode.

5:- Access system with chroot command and change password with passwd command,Update SElinux and exit from shell  and now reboot system.


System take more time than normal boot.

Now Enjoy…

Leave a Reply

Please log in using one of these methods to post your comment: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s