Reset forgotten password Linux mint

Recently I installed Linux Mint 18.1 Serena on my laptop, installation was a success but I was not able to log in with my password. Did some googling and found a way to reset the password.
Actually, I found this forum https://community.linuxmint.com/tutorial/view/1355
what I have done here is given a detailed explanation from this forum.
In this blog post, I have used Linux Mint 18.1 as the OS, but I think for other Linux distributions we will have to follow the same instructions.

To reproduce this I have installed Linux Mint 18.1 in a virtual box, so now I am trying to log in and I am purposely entering an incorrect password, so let's see how we can reset the password.

Follow these steps
    1. Restart your computer.
    2. Hold down shift key to enable GRUB menu
      3.Then press e to edit 
      4. Use the Arrow keys to navigate to a line that looks similar to this:

linux         /boot/vmlinuz-[kernel version]-generic root=UUID=[letters and numbers]\[letters and numbers] ro quiet splash $vt_handoff

5.Change ro quiet splash $vt_handoff to rw init=/bin/bash finally it should be like this 
linux        /boot/vmlinuz-[kernel version]-generic root=UUID=[letters and numbers]\[letters and numbers] rw init=/bin/bash
6. Then press F10 to boot your system
7. Now you will prompt a passwordless root shell
8. Type passwd your_user_name
     You can find your username by typing cat  /etc/passwd  it will display at the end
9. Now set your new password
10. Restart your computer. 

That's it :) 

Again Tested on above OS only!







Comments

  1. At APTRON Solutions, we believe in learning by doing. Our Linux Course in Noida provides ample opportunities for hands-on practice in a simulated environment. You'll work on real-world projects and assignments, allowing you to apply theoretical concepts to practical scenarios. Our experienced trainers offer personalized guidance and support, ensuring that you make the most out of your learning journey.

    ReplyDelete

Post a Comment