When you happen to lose the root password of your VPS and your VPS uses GRUB bootloader (almost all Linux distributions use this), then it's possible to reset your root password. In this article, you'll find tutorials for resetting your root password in various operating systems.
- Resetting your root password in Ubuntu / Debian
- Resetting your root password in CentOS 7
- Resetting your root password in CentOS Stream, AlmaLinux or Rocky Linux
Other Linux distributions
Step 1
Open the VPS console in the TransIP control panel (in the tab 'BladeVPS') and restart your VPS using the 'Ctrl-Alt-Del' button at the bottom right of the console.
Step 2
Immediately after the reboot, a message will appear in the console to press any key (such as ESC) to open the GRUB menu. Please note: This menu is only visible for 2 seconds and you will also have to press a few times to prevent the OS from booting.
Step 3
Select the kernel and press 'a' (the top one is usually selected by default and most likely the one you're using).
Step 4
Now type 'single' after the line (space) and press 'Enter'.
Step 5
The OS will now boot in single-user mode as root. Use the following commands to first reset your root password and then reboot your VPS:
passwd root
reboot
Are you getting an error message? Then, use 'reboot -f'
Should you have any questions left regarding this article, do not hesitate to contact our support department. You can reach them via the ‘Contact Us’ button at the bottom of this page.