Access Single User Mode (Reset Root Password)

This is applicable only to KVM based VPSes and Dedicated Servers

To reset the root password of your server, you will need to boot into single user mode.

Please login to the management panel at https://crownpanel.com to manage your VPS. Here you will find the HTML5 based VNC option required to access the VPSes console to boot into single user mode.

CentOS 6

  • Click on the VNC Tab to access the console and click on the "Launch VNC" button, next press on the CTRL+ALT+DEL button. If this does not reboot the VPS, click on the "Power Control" Tab and then on the Reboot button to restart the server.

  • You will see a GRUB boot prompt asking you to press any key - you have only a few seconds to press a key to stop the operating system boot up. (If you miss this prompt you will need to restart the VM again)

  • At the GRUB prompt, type "a" to append to the boot command.
  • Add the text "single" and press enter.
  • System will boot and you will see the root prompt. Type "passwd" to change the root-password and then reboot again.

CentOS 7

  • Click on the VNC Tab to access the console and click on the "Launch VNC" button, next press on the CTRL+ALT+DEL button. If this does not reboot the VPS, click on the "Power Control" Tab and then on the Reboot button to restart the server.

  • As soon as the boot process starts, press ESC to bring up the GRUB boot prompt. You may need to "Reboot" the VPS from the "Power control" tab to reach the GRUB boot prompt.

  • You will see a GRUB boot prompt - press "e" to edit the first boot option. (If you do not see the GRUB prompt, you may need to press any key to bring it up before the machine boots)

Find the kernel line (starts with "linux16"), change,

ro

to

rw init=/sysroot/bin/sh.

Press CTRL-X or F10 to boot single user mode.

Enter the system with the command,

chroot /sysroot.

Run passwd to change the root password.

passwd

Reboot the system

reboot

Debian/Ubuntu

  • Click on the VNC Tab to access the console and click on the "Launch VNC" button, next press on the CTRL+ALT+DEL button. If this does not reboot the VPS, click on the "Power Control" Tab and then on the Reboot button to restart the server.

  • As soon as the boot process starts, press ESC to bring up the GRUB boot prompt. You may need to "Reboot" the VPS from the "Power control" tab to reach the GRUB boot prompt.

  • You will see a GRUB boot prompt - press "e" to edit the first boot option.

  • Find the kernel line (starts with "linux /boot/") and add,

init="/bin/bash"

at the end of the line.

  • Press CTRL-X or F10 to boot.

  • System will boot and you will see the root prompt. Type,

mount -rw -o remount /

and then,

passwd

to change the root password and then reboot back to the operating system with,

reboot

  • For Ubuntu 17.04, the command may need to be mount -o remount,rw / .

Last modified: October 07 2017 00:37:04