Dec 22, 2017

Reset Fedora root forgotten password

Start with select the boot line and press e key to edit.
Find the line with linux16 and add this on the end of this row:

rd.break
( rd.break, this interrupt the boot process before control is passed from initramfs to systemd. )

Press Ctr+x or F10 keys to reboot.
#mount | grep root
#mount -o remount,rw /sysroot
#mount | grep root
#chroot /sysroot/
#passwd root
...
#touch /.autorelabel
#exit
#reboot

Done! You can use the new password for user root to login the system.
You may need to choose between a possibly time consuming SELinux file relabel or changing the SELinux enforcing mode and then restoring the SELinux security context for /etc/shadow/ when the boot completes.