Reset VPS root password

If the server is up and running, reboot it using Send Ctrl+Alt+Del

file

After the BIOS boots, the GRUB bootloader menu will appear.

file

Use the and keys to switch between lines in the download menu. Highlight the desired line and press the e key to start editing boot parameters.

Next, let's find and edit the initial boot line which starts with linux /boot/...

file

The ro (read-only) parameter is responsible for loading the Linux kernel in read-only mode. For changes to be preserved after resetting the root password, you must replace ro with rw (read-write) - the read-write mode.

Let's specify to run the bash shell by writing rw init=/sysroot/bin/sh as shown in the screenshot:

file

Press Ctrl+X or F10 and wait for the operating system to boot in single-user mode.

To set a new root password, enter the command:

chroot /sysroot  

Next the command:

passwd root  

Enter the new root password:

file

Save the changes with the commands:

exit  
reboot  

Resetting the root password on a Dedicated Server

In the IPMI web interface, go to Remote Control → Console Redirection and click Launch Console

file

Note that you need to have Java Runtime Environment software installed for the console to work. The installation file will be automatically downloaded when you click on Launch Console

Save and run it, then in the window that appears tick the checkbox at the bottom and click Run.

file

The first time you run it, you'll probably get a notification from Java's security system:

file

In this case you need to put IPMI IP address (both http:// and https://) into security exceptions in Java settings, instructions are available at Java. After that you will be able to run the console.

After entering the console, restart the server by going to Remote Control → Power Control select Reset server

file

After rebooting the server, the GRUB menu appears in the BIOS menu before the OS starts.

file

Use the and keys to navigate the menu, select your boot string and press e to edit it.

Find the line that starts with linux on IBM Power Series 64-bit systems or linux16 on x86-64 BIOS-based systems or linuxefi on UEFI-based systems
Change the ro parameter to rw, remove the rhgb and quiet parameters:

file

Next, add rd.break enforcing=0 at the end of the line:

file

Press CTRL + X to start the system in single-user mode

Run the following commands to change the root password and reboot:

chroot /sysroot  
passwd root  
touch /.autorelabel  
exit  
reboot  

If you have configuration difficulties or additional questions, you can always contact our support team via Ticket system.

Updated Aug. 27, 2021