Reset Root Passwords on RHEL 7 and CentOS 7 Linux Systems

Grub2

Select e for edit

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

then ctrl + x

2

 

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

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

or 
#passwd root
#passwd 
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:

WordPress.com Logo

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

Facebook photo

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

Connecting to %s