1. Knowledge base
  2. Recovery of root password on Debian 8

Recovery of root password on Debian 8

Updated on 17 April 2023 3 min read Snel.com support team

Introduction

In this article, we will learn how to recover the password of the root user account on the Debian 8 operating system.

Debian 8 password recovery logo

Prerequisites

Recovery of root password

Log into the KVM console

In order to change the root password you will need to log into the KVM console, depending on which server type you are using the methods may differ.

If you are using Cloud VPS please refer to this article

If you are using a dedicated server with iDRAC please refer to this article

If you are using a Supermicro servers please refer to this article

For VPS users navigate to under the VPS service details page, from there you can click Console, this will open the KVM console on a new browser.

Reboot the machine

While you have your KVM console open, reboot the server to get the GRUB menu.

Dedicated server users will have to open Server Power Control

right after that click reboot to restart your server.

VPS users: Open the service details page of the VPS and click on the reboot button

Note: After rebooting your server quickly go to the KVM console as GRUB menu waits only a few seconds before booting OS.

Modify boot parameters

After rebooting the VM quickly switch to KVM console and keep pressing the ESC.

You will need to do this very quickly to get the GRUB menu.

 Note: If you missed the grub screen, go ahead and reboot your server again.

In GRUB menu, press E to edit the GRUB parameters

In GRUB edit mode, find the line which starts with linux /boot/ , next you will need to navigate to the end which should show ro quiet , add a space and type the following:

Code
init=/bin/bash

it should look like this:

Code
linux          /boot/vmlinuz-3.16.0-6-amd64 root=UUID=08e369b4-8967-471b-b80c-3b09618af121 ro  quiet init=/bin/bash

Once done, press CTRL + X or F10 to boot in single-user mode.

Reset password

Next you will need to change the acces right from read-only to read-write, to do so type the following command:

Code
mount -o remount, rw /

Now we can change the root password, run the following command to change your password:

Code
passwd

to change your password.

After that you can reboot the server with the following command:

Code
reboot -f

Conclusion

In this tutorial we have shown how to recover the root password for Debian 8.

Was this article helpful?

Spot a mistake in this article? Email us at support@snel.com

This article was last checked on 17 April 2023. · 2,822 views

Your own VPS online within 2 minutes

Windows or Linux, root access and hosted in Rotterdam.

View VPS from € 6.99

Support

Can't figure it out? We are happy to help

You always talk to a real engineer. We typically respond within 15 to 30 minutes, and 24/7/365 for outages.

Call us

+31 88 3 088 099

Create a ticket

Through the client area we immediately see which service it is about.

Email us

Send your question via the contact form, also outside office hours.