The process is very different in V2/V3 (Centos 6) versus V4 (CentOS 7).
Taken from https://www.tecmint.com/reset-forgotten-root-password-in-centos-7-rhel-7/
Reboot the ELM. At the GRUB kernel boot list, immediately hit the up or down arrow to interrupt the automatic boot process. Arrow up to the top entry and type 'e' to edit it. Arrow down to the "linux16 /vmlinuz" line. Replace "quiet" with "init=/bin/bash" without the quotes. Type Ctrl-X to boot from this configuration.
You will boot to single-user mode with a read-only root filesystem. Switch it to read/write with this command:
mount -o remount,rw /
Now change the root password:
passwd root
Then fix the SELinux label and reboot with these two commands:
touch /.autorelabel
exec /sbin/init
Login with the new root password. Reboot once just to confirm that everything works.
Normally we have root access on the MA and the CP's. If the customer had changed this password and then forgot the password then we will need to bypass the normal Linux boot process to reset it.
Open a console window for the appliance. This will work the same from Hyper-V by connecting to the VM from the Hyper-V manager.
Reboot the VM. Early on in the boot up you should see a countdown (Boot CentOS .......). When you see this countdown press escape, you will only have a few seconds to catch this. You should now see the menu for the GRUB boot loader.
A line will be highlighted that says "CentOS (Some kernel version here)"
Press the 'e' key to edit this line. Now you have three options. You should select the second option that begins with "kernel /vmlinuz-something something". Press the 'e' key again to edit this line. Your cursor will already be at the end of the line and the line should end with 'quiet'. After quiet add a space and then the number 1. This will set a flag to boot to Linux run level 1. Press enter to save the changes (this will be temporary for this boot only and will not persist on the following boot). Once you are back to the prior menu then press 'b' to boot.
This will now boot you directly to a command prompt. If you get just a blank screen then press enter or ctrl + c to get the prompt to show up.
Now enter 'passwd' to reset the root password. Once done, reboot the appliance or just type 'init 3' to finish the boot sequence.