04 Jun

How To Reset Root Password On CentOS 7

CentOS7 is root password changing is totally different from CentOS 6. Now I going to show you how to reset root password in CentOS 7. This way also working for Citrix Xenserver Virtual Machine, KVM and other’s Virtual Machine platform. Even you can reset CentOS 7 password, if your server going to Emergency Maintenance mode.

Step 1: In the boot grub menu select option to edit

Press e

Centos7 password reset image

Step 2: Go to the line of Linux 16 and find out ro

Step 3: Now change ro with rw init=/sysroot/bin/sh

Step 4: Now press Control+x to start on single user mode

Step 5: Now access the system with this command

chroot /sysroot

Step 6: Reset the password.

passwd root

Step 7: Update selinux information

touch /.autorelabel

Step 8: Exit chroot


Step 9: Reboot your system


That’s it 🙂 Enjoy! 🙂

Leave a reply