Monday, 22 June 2015

[Solution] Forgot the username and password of the newly installed linux mint!

<Read story first

There are plenty of different procedures on the web for resetting the password of your linux distribution. As disparate as they seem, all of them work by logging into passwordless root shell. Following are the steps I gathered from sources and followed. Worked as a charm!

[Found out that these steps don't work if you have encrypted your home directory or whole system. Guess you need to encrypt every other thing out there to be secure]**

  1. Reboot your PC.
  2. Hold down the Shift key at the start of the boot process to enable the GRUB boot menu.
  3. Select the entry for your Linux installation (not the recovery-mode one)
  4. Then press e to edit.
  5. You'll see bunch of options for system-startup.
  6. 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=7
     
  7. Change ro quiet splash vt.handoff=7 to rw init=/bin/bash so it now reads:

    linux /boot/vmlinuz-[kernel version]-generic root=UUID=[letters and numbers]\[letters and numbers] rw init=/bin/bash

  8. Press F10 or Ctrl+X to boot your system.
  9. Your system will boot up to a passwordless root shell.
  10. Now, since I had forgotten the username, in my case, I first printed the list of users.
    Type cat /etc/passwd first to get a list of all users and note your username. In most cases, it is at the end.
  11. Type in passwd yourusername
  12. Set your new password.
  13. Restart your system.
It was a nice introduction my brother got of linux, without even using a mouse. I guess that was the whole purpose of Linux, we should be able to do everything via terminal. That's what I tell him, this is how perfect security is achieved, by perfect knowledge about the underlying things.

However, we ended up formatting mint the other day itself, and installed a super-slow-Ubu14.04 : #believe_me - it was worse than what Windows could ever get! The real task now was, to run the Ubu on the PC with 1GB ram and only 10gigs of Swap space. To know how to speed up the ubuntu system, and disabling the 3D graphics,  stay tuned for our next post!

No comments:

Post a Comment