How to Reset the Cloud VPS Access Password
If you created a Linux Cloud VPS on SeFlow and no longer remember the access password (set during the initial configuration), you can reset it directly from the operating system using the recovery console.
Who Can Perform the Password Reset
The password reset procedure can be executed on all Linux Cloud VPS created with templates based on:
- AlmaLinux
- CentOS
- Debian
- Ubuntu
- openSUSE
The procedure varies depending on the selected template.
Password Reset for AlmaLinux Cloud VPS
- Access the VPS via the recovery console in the SeFlow panel.
- At the GRUB boot screen:
- select the AlmaLinux Kernel using the arrow keys;
- press e to edit the boot options.
- Locate the line beginning with
linuxand position yourself between/swapandinitrd, for example:rd.lvm=almalinux/swap initrd - Add the parameters
rd.break enforcing=0, so the line becomes:
If options such asrd.lvm=almalinux/swap rd.break enforcing=0 initrdrhgborquietappear after/swap, remove them. - Press Ctrl + X to boot with the modified configuration.
- At the prompt, execute:
mount -o remount,rw /sysroot chroot /sysroot passwd root - Enter and confirm the new
rootpassword. - Restart the system:
reboot - After logging in with the new password, restore SELinux context and enforcement:
restorecon /etc/shadow setenforce 1
rd.break parameter is not left in the persistent kernel options after completing the reset.Password Reset for CentOS Cloud VPS
- Open the recovery console from the SeFlow panel.
- At the GRUB screen:
- select the Linux Kernel entry using the arrow keys;
- press e to edit the entry.
- Locate the line beginning with
linuxand find theroparameter. - Replace
rowith:rw init=/sysroot/bin/sh - Press Ctrl + X to boot into single-user mode.
- At the prompt, run:
chroot /sysroot passwd root touch /.autorelabel exit reboot
/.autorelabel file triggers SELinux relabeling at reboot. Do not interrupt this process; it may take several minutes.Password Reset for Debian/Ubuntu Cloud VPS
- Open the recovery console in the SeFlow panel.
- During boot, the grub-boot countdown appears:
- approximately 5 seconds on Debian;
- approximately 3 seconds on Ubuntu.
- Before the countdown ends, press e to enter boot editing mode.
- In the editor:
- move to the kernel loading line (usually starting with
linux); - append the following to the end of the line:
init=/bin/sh
- move to the kernel loading line (usually starting with
- Press Ctrl + X to boot with the modified options.
- At the prompt (
#), execute:mount -o remount rw / passwd - Enter and confirm the new
rootpassword. - Reboot using:
orrebootinit 6
init=/bin/sh parameter is removed from permanent boot entries after the reset.Password Reset for openSUSE Cloud VPS
- Access the server via the recovery console.
- During boot, you will see the grub-boot countdown (about 5 seconds).
- Before the countdown ends, press e to edit the boot entry.
- In the editor:
- locate the kernel loading line (
linuxorkernel); - press e again to edit it;
- append:
init=/bin/bash - press Enter to confirm.
- locate the kernel loading line (
- Return to the previous screen and press b to boot.
- At the prompt (
#), reset the password:
then enter and confirm the new root password.passwd - Reboot the system:
reboot
init=/bin/bash has been removed from the GRUB boot entries.After Resetting the Password
- log in using the new password (SSH for Linux VPS);
- consider changing your password periodically following security best practices;
- if access still fails:
- ensure the password is typed correctly;
- check that the console keyboard layout matches yours;
- verify firewall and network rules on the VPS.
