Changing Ubuntu’s password

It’s important to choose a safe and secure password for any machine, but sometimes it’s not so easy to remember the password for a long time, which sometimes tend to remove the OS and reinstall. Why to make the process such difficult when you can change the password without making much moderation.

For a fresh start – reboot the machine.

Hold shift key to get into GRUB, for a dual booted version they automatically get into GRUB.

Select your version of Ubuntu image and press E to edit the image.

Find the line starting with Linux and at the end of the line type this command ->

rw init=/bin/bash 

Then press F10 or ctrl + x to save the changes and boot OS, if it comes as a blank page with a blinking underscore then do redo the above procedures carefully.

Hope it worked till now!

Now you get into root mode and type

$passwd <your username>

System will prompt to enter your new password. Enter a valid and easy_to_remember password and save the change.

Reboot the system, and congratulations you are back to Ubuntu 🙂