Breaking into Debian - Adam-Hachem/SEC335 GitHub Wiki
Obtaining access to the root account is fairly easy if you have physical access. This should work on Debian distros, but we will use Kali for this example. Below are the steps necessary to break in:
- Restart the system, and press space when you see the boot option screen:
- Press E to edit the configuration, add the extra text
single init=/bin/bash
to a line as shown below. UseCtrl + X
to boot with the changes:
-
Mount the filesystem with
mount -rw -o remount /
-
Change the root password with
passwd
, then set the password for the root account. Save the changes withsync
and unmount withumount /
You should now be able to power cycle the machine and log in as root, which has the new password.