How to Reset a Forgotten Ubuntu Password

If you're like me and often forget your Ubuntu password, you're not alone. I used to Google the reset steps every time—until I finally decided to write them down. Here's my go-to method for resetting the password using recovery mode.

🛠️ Step-by-Step Guide

1. Reboot into Recovery Mode
  • Restart your Ubuntu system.
  • At the GRUB boot menu, select the Advanced options for Ubuntu.
  • Choose the entry with (recovery mode).

2. Access the Root Shell
  • In the Recovery Menu, select:  

     root – Drop to root shell prompt

3. Remount the Filesystem with Write Access
  • At the shell prompt, run:

     mount -rw -o remount /


4. Identify Your Username
  • To list home directories and find your username:

     ls /home

5. Reset the Password
  • Replace (username) with your actual username:

     passwd (username) 

  • You'll be prompted to enter a new password:

     Enter new UNIX password:
     Retype new UNIX password:
  • If successful, you'll see:
     passwd: password updated successfully

6. Reboot the System
   
   reboot

 
✅ You're Done!
You can now log in using your new password.