This guide is for resetting the password on CentOS 7 / REHL. Please follow the below steps:
The parameter rd.break causes the boot process to be interrupted before initramfs passes control to systemd. Thus, the initramfs prompt can be used for command entry. The parameter enforcing=0 puts SELinux into permissive mode. This saves the later (and possibly very time-consuming) relabelling of the file system, which would be necessary when SELinux is switched off.
Please Note, If the file system is encrypted, the prompt for entering the password may be overlaid by the system messages, making it no longer visible. If this is the case, briefly press the Backspace key. The prompt should be displayed again.
switch_root:/# mount -o remount,rw /sysroot
switch_root:/# chroot /sysroot
The prompt changes to sh-4.2#.
If passwd aborts with the message Authentication token manipulation error, you have to leave the chroot environment again and remount /sysroot - as described in the previous step - with write permissions.
Still need help? Open a support ticket