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.

Tip: The following procedures modify the system boot options. Perform them only if you are familiar with Linux system administration. Before proceeding, consider using snapshots or backups of your Cloud VPS.

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.

Tip: If you lost the password for a Windows Cloud VPS, there is no autonomous reset procedure. In this case, you must open a support request to SeFlow.

Password Reset for AlmaLinux Cloud VPS

  1. Access the VPS via the recovery console in the SeFlow panel.
  2. At the GRUB boot screen:
    • select the AlmaLinux Kernel using the arrow keys;
    • press e to edit the boot options.
  3. Locate the line beginning with linux and position yourself between /swap and initrd, for example:
    rd.lvm=almalinux/swap initrd
  4. Add the parameters rd.break enforcing=0, so the line becomes:
    rd.lvm=almalinux/swap rd.break enforcing=0 initrd
    If options such as rhgb or quiet appear after /swap, remove them.
  5. Press Ctrl + X to boot with the modified configuration.
  6. At the prompt, execute:
    mount -o remount,rw /sysroot
    chroot /sysroot
    passwd root
  7. Enter and confirm the new root password.
  8. Restart the system:
    reboot
  9. After logging in with the new password, restore SELinux context and enforcement:
    restorecon /etc/shadow
    setenforce 1
Tip: Make sure the rd.break parameter is not left in the persistent kernel options after completing the reset.

Password Reset for CentOS Cloud VPS

  1. Open the recovery console from the SeFlow panel.
  2. At the GRUB screen:
    • select the Linux Kernel entry using the arrow keys;
    • press e to edit the entry.
  3. Locate the line beginning with linux and find the ro parameter.
  4. Replace ro with:
    rw init=/sysroot/bin/sh
  5. Press Ctrl + X to boot into single-user mode.
  6. At the prompt, run:
    chroot /sysroot
    passwd root
    touch /.autorelabel
    exit
    reboot
Tip: The /.autorelabel file triggers SELinux relabeling at reboot. Do not interrupt this process; it may take several minutes.

Password Reset for Debian/Ubuntu Cloud VPS

  1. Open the recovery console in the SeFlow panel.
  2. During boot, the grub-boot countdown appears:
    • approximately 5 seconds on Debian;
    • approximately 3 seconds on Ubuntu.
  3. Before the countdown ends, press e to enter boot editing mode.
  4. 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
  5. Press Ctrl + X to boot with the modified options.
  6. At the prompt (#), execute:
    mount -o remount rw /
    passwd
  7. Enter and confirm the new root password.
  8. Reboot using:
    reboot
    or
    init 6
Tip: Make sure the init=/bin/sh parameter is removed from permanent boot entries after the reset.

Password Reset for openSUSE Cloud VPS

  1. Access the server via the recovery console.
  2. During boot, you will see the grub-boot countdown (about 5 seconds).
  3. Before the countdown ends, press e to edit the boot entry.
  4. In the editor:
    • locate the kernel loading line (linux or kernel);
    • press e again to edit it;
    • append:
      init=/bin/bash
    • press Enter to confirm.
  5. Return to the previous screen and press b to boot.
  6. At the prompt (#), reset the password:
    passwd
    then enter and confirm the new root password.
  7. Reboot the system:
    reboot
Tip: If the system behaves unexpectedly after reset, verify that 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.
Tip: If you still cannot access your Cloud VPS after completing the reset, open a support request with SeFlow and include as many details as possible (template, OS version, error messages).

 

Was this answer helpful? 0 Users Found This Useful (0 Votes)