How to reset a forgotten Ubuntu password

H

How Can We Help?

How to reset a forgotten Ubuntu password

  • Boot up your System
  • When the Grub screen appears choose “Ubuntu x.xx, kernal x.x.x-xx-generic (recovery mode)”. The x’s are in the place of the version numbers
  • On the next screen select “Drop to root shell prompt”
  • Once in the root shell prompt use the passwd command to reset your password
    password USERNAME

    Replace USERNAME with the username who’s password you need to reset

  • Next enter the following commands to force changed blocks to disk and reboot the System
    sync
    reboot -f

    sync = Writes any data buffered in memory out to disk and ensures that everything in memory is written to disk.
    reboot -f = Reboots the system-f forces the system to reboot

  • After the reboot, you should be able to login with the new password.

About the author

Ian Carnaghan

I am a software developer and online educator who likes to keep up with all the latest in technology. I also manage cloud infrastructure, continuous monitoring, DevOps processes, security, and continuous integration and deployment.

About Author

Ian Carnaghan

I am a software developer and online educator who likes to keep up with all the latest in technology. I also manage cloud infrastructure, continuous monitoring, DevOps processes, security, and continuous integration and deployment.

Follow Me