Reset Root Passwords on RHEL 7 and CentOS 7 Linux Systems


Select e for edit

come to the line linu16 end UTF-8 type rd.break

then ctrl + x



switch_root:/# mount -o remount,rw /sysroot
switch_root:/# chroot /sysroot

sh-4.2# echo “New-root-password” | passwd --stdin root

#passwd root
sh-4.2# touch /.autorelabel (Note :relabel spelling is important)

# exit
# exit

restarted the system

Leave a Reply

Fill in your details below or click an icon to log in: Logo

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

Facebook photo

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

Connecting to %s