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 passwd
# 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!.