Root
Password Reset In CentOS / Rhel 7
Q : How to reset root password in CentoOS 7
Q : Step by Step root password reset in linux
Q : Forgotten root password recovery on CentOS 7
Reboot
your server and select existing
kernel
Select
Kernel at boot menu, and press “e” to edit kernel (Core).
Step 2:
Find
“ro” and replace with "rw
init=/sysroot/bin/sh”
press
“Control + X” or “ Ctrl + X ”on your keyboard to start into
single user mode
Step 3:
run
the command into single user mode
chroot
/sysroot
Step
4 :
Change
the root password using "passwd" Command,
passwd
Step 5:
Update
SELinux parameters
touch
/.autorelabel
Step 6 :
Reboot Server
reboot