Resetting Your Root Password (CentOS Stream 9)
Please use the “Print” function at the bottom of the page to create a PDF.
For Cloud Servers with CentOS Stream 9
Forget the admin password of your server? We'll show you how to reset it using the KVM console.
Please Note
If you did not set your own password when creating the server and did not change the automatically assigned initial password afterwards, you can display the initial password in the Cloud Panel display.
Starting KVM Console
Log in to your IONOS account.
Click on the Server & Cloud tile. If you have multiple contracts, select the desired Server & Cloud contract.
In the Cloud Panel, in the Infrastructure > Server section, enable the desired server.
To launch the KVM console in a new tab, click Actions > Access KVM Console.
Switch back to the Cloud Panel tab.
Make sure that the desired server is enabled. Then, click Actions > Restart.
Select the Hardware method and click Yes.
Immediately switch to the tab where the KVM console is open and hold down the Shift key to open the Grub start menu.
Notes
When entering the Grub Start menu, the Shift key must be pressed immediately after rebooting. If you see the VMware logo, you have missed the point at which you can access the grub start menu.
On some servers, you may need to press the Esc key instead of the Shift key.
Modifying the GRUB Start Menu
From the GRUB Start menu, press the e key to edit the startup entry.
At the end of the line that begins with the string linux ($root)/, add the following parameters:
linux ($root)/vmlinuz-5.14.0-105.el9.x86_64 root=/dev/mapper/centos-root\ ro re\sume=/dev/mapper/centos-swap rd.lvm.lv=centos/root rd.lvm.lv=centos/swap selin\ux=0 crashkernel=1G-4G:192M, 4G-64G:256M, 64G-:512 init=/bin/bash
Press F10 to boot the system with the changed parameters.
The server now boots into a root shell without password prompting.
Please Note
If the file system is encrypted, the prompt for password entry may be overlaid by the system messages and therefore not visible. In this case, press the Backspace key briefly. Now the prompt should be displayed again.
Changing the Password
Once the shell is ready, the first thing you need to do is mount the system partition with write access. To do this, enter the following command:
bash-5.1# mount -o remount,rw /
Now you can change the password using passwd:
bash-5.1# passwd
Enter new UNIX password:
Retype new UNIX password:
passwd: password updated successfully
Please Note
If passwd terminates with the message Authentication token manipulation error, you must exit the chroot environment again and remount /sysroot with write permissions as described in the previous step.
Switch to the Cloud Panel. Then, click Actions > Restart.
The server will now boot back into the normal system. You can then log in with your new
password.