If the server is on and loaded, restart it using Send Ctrl+Alt+Del

file

At the moment when the screen with the bootback report to boot appears, press any key to get to the GRUB bootloader menu.

The very first item is the main boot kernel, select it and press e to start editing boot parameters.

file

Next, we select the item:

kernel /boot/vmlinuz-.  

And also press e to edit

file

In the window that opens, add the word single to this line, separated by a space

file

Press Enter

This will bring us back to the GRUB menu, select kernel /boot/vmlinuz and press b to boot the operating system in single-user mode.

file

To set a new root password, type the command:

passwd  

file

Enter the new root password twice:

file

Save the changes with commands:

exit  
reboot  
Updated Aug. 5, 2019