Before you lose or forgot your password and left with frustration and exasperation, you should know how to change or reset it. So here’s our post regarding the cure of most common problem arisen.
Resetting password of RHEL, CentOS and Fedora :-
1. Start your computer and wait for the boot menu to appear.
2. At the grub boot menu, press e to edit the existing kernel (Core).
3. To modify it just change read only mode (ro) to rw (write mode) and add init=/sysroot/sbin/sh like below screenshot then press F10 or CTRL+X to reboot the Kali Linux.
4. In the single user mode, run the command > “chroot /sysroot”.
5. Finally, run the commands “passwd root” You’ll be prompted to create and confirm a new password.
6. After creating the password, run the commands below to update SELinux parameters “touch /.autorelabel”
7. reboot -f