Hi Bros!
If you have physical access to a Linux computer, and the disk is not encrypted, it's easy to get root privileges, following these steps:
If you have physical access to a Linux computer, and the disk is not encrypted, it's easy to get root privileges, following these steps:
- Boot the Linux system and access the GRUB boot loader menu by pressing and holding the Shift key during startup (if GRUB is not already set as the default boot loader).
- Select the Linux distribution and version you want to boot into and press the "e" key to edit the boot configuration.
- Find the line that starts with "linux" or "linux16" and append the following at the end of the line: init=/bin/bash.
- Press Ctrl+X to boot into single-user mode.
- Type the command mount -o remount,rw / to remount the root file system as writable.
- Type the command passwd to change the root password. Follow the prompts to set a new password.
- Reboot the system by typing the command reboot and pressing Enter.