How to Reset Linux Password
Linux is simply known as the Operating System (OS) and it is came from the family name which denotes free and open-source software. And Linux package is produced by the Linux Distributors. What happens when you forgot the user password to open your device which has the Linux OS? You can’t do anything except resetting. Now you can Reset Linux Password easily.
To Reset Linux Password by rebooting your device, you can follow these steps:
- So first off all, you need to reboot your computer if turned on already or simply turn it on if not turned on. As you are rebooting or starting your computer, you need to press and hold down the “Shift” key at the start of the boot process.
- This key press will enable the GNU GRUB2 boot menu in your computer. If it does not show then you need to select the entry for your Linux installation by your own and as you open, you need to press ‘E’ key form the keyboard to use edit function.
- Then after that, you can start using the “Arrow keys” to navigate to a line which looks similar to this “linux /boot/vmlinuz-[kernel version]-generic root=UUID= [letters and numbers]\ [letters and numbers] ro quiet splash vt.handoff=7”.
- So as you find the exact line, you need to change “ro quiet splash vt.handoff=7” which is in the last of the statement to “rw init=/bin/bash”. This will now read as “linux /boot/vmlinuz-[kernel version]-generic root=UUID=[letters and numbers]\[letters and numbers] rw init=/bin/bash”.
- As ther changing the statement, you need to press “F10” key form the keyboard to boot your system. As your system will boot up, it will start up to a password-less root shell.
- There, you need to type in passwd “your username” (incase, you have also forgotten your username, type cat / etc / passwd first to get a list of all users and there you will find yours at the end.)
- Then you will get a screen where you can set your new password there. As you do that, you need to restart your system and after that you are done.
The new passwords you have created should be used every time you use to login.