If you have forgotten your Linux OS password and can’t get in, don’t worry, I got your back.
In this article, I will explain how you can crack a Linux password without any need of external hardware like a USB drive or anything like that.
This method to reset Linux password works on all Linux OS with GRUB Bootloader
Common Linux Distributions with GRUB
- Ubuntu andits derivatives (like Linux Mint)
- Debian (Kali linux, parrot os)
- Fedora
- CentOS
- Arch Linux (BlackArch Linux)
- openSUSE
- Redhat Linux
Let’s get into some cracking.
Steps to Follow:
- Open GRUB menu
- Edit GRUB menu
- reset password
- reboot
Open GRUB menu
First we need to edit GRUB menu.
You will see GRUB menu when you boot your linux OS.
If you don’t see it then just restart and you can hold shift while booting , it will bring GRUB menu.
It will look something like this
You can see Linux Mint 21.1 Cinnamon is highlighted.You may see a different OS or version of Linux depending on your Linux installation.
If you don’t see your Linux OS highlighted then you can use UP and DOWN arrow keys to highlight that.
If you see your Linux OS highlighted, press e to edit it.
This is how it would look.
Edit GRUB
Now use DOWN arrow key to scroll down and find line starting with Linux
and ends with ro quiet splash.
Now at the end of line after ro quiet splash
add this line rw init=/bin/bash
Now press Ctrl + x or F10 to save it.
Your system will boot and you will see a terminal.
Reset Password
Now use passwd command:
syntax:
passwd <username>
Check how to change password in Linux?
In this Linux OS i have a username ak i will use that but you can use any user even you can use root user if you want to crack root password.
Password is updated.
Now you can login as user ak with the updated password.
Press Ctrl + Alt + Del to exit the terminal and boot into linux mint.
Read here about optimizing your security-focused system.