Monday, April 1, 2019

Reset the password - CentOS And RHEL7

Reset the password - CentOS And RHEL7

- reboot the system and press "e" to enter the edit mode at the boot loader screen.
- Find “linux16” and go to the end of it. Enter ‘rd.break’ without quotes at the end of this line.
- Press Ctrl-x" to boot.
- remount the root file system in RW mode
- mount -o remount,rw /sysroot
- Change to chroot jail so that /sysroot can be used as root of the FS.
- Now you can reset the root password.

PS: This is for my reference only. Please use at your own discretion.

No comments: