1. Restart and press esc
2. Press e
3. Edit and modify two places: ro to rw, add init=/bin/sh after LANG=en_US.UFT-8
4. Press Ctrl+X to restart, and change the password
5. Because selinux is turned on, you need to execute the following commands to update the system information, otherwise the password will not take effect after restarting
touch /.autorelabel
6. Restart the system
exec /sbin/init