Linux: Resetting root password on Debian based distributions

When you lost access to root or any other account on a Debian based system, use this simple steps to gain access:

  • At the boot window, where it counts down, quickly press “e” where you stand.
  • Scroll down to the kernel line you will boot from, it starts with “linux /boot/vmlinuz-…….
  • Scroll to the end of that line and press space key once and type init=/bin/bash
  • Press Ctrl X to boot
# Remount / as Read/Write 
mount -rw -o remount /

# Change the root account password with

# Change any other account password with
passwd username

# type new password, confirm and hit enter and then reboot by reset or preferred method,
 settings are already saved!.

Leave a Comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

By continuing to use the site, you agree to the use of cookies. more information

The cookie settings on this website are set to "allow cookies" to give you the best browsing experience possible. If you continue to use this website without changing your cookie settings or you click "Accept" below then you are consenting to this.