How to reset Forgotten Password on Ubuntu Linux

|

|

This article provides a step-by-step guide to resetting a forgotten password, including root user, on Ubuntu 17.04 | 17.10 and 18.04 LTS. The process includes accessing the Ubuntu boot menu, selecting the recovery mode, remounting the shell with read/write permissions, and resetting the password through specific commands before rebooting the system.

This post shows students and new users steps to easily reset a forgotten password, including the root user on Ubuntu Linux.

Forgetting your Ubuntu desktop or server password may prevent you from logging on physically or remotely.

Learning how to reset forgotten passwords on Ubuntu Linux is essential because forgetting your password can prevent you from logging in physically or remotely to your Ubuntu desktop or server.

This can cause a significant inconvenience and may even lead to data loss. Therefore, knowing how to reset a forgotten password is crucial for Ubuntu Linux users to regain access to their system and data quickly and safely.

Additionally, this knowledge can help troubleshoot scenarios and manage user accounts on Ubuntu Linux.

To reset a user or root password, turn on the desktop or server and begin pressing the Esc key or Shift on your keyboard. When you turn, push the power button to display the Ubuntu boot menu.

If your timing is wrong and you miss the boot menu, you’ll have to restart the machine and try again until you see the screenshot below.

On the menu, select *Advanced options for Ubuntu.

Next, select *Ubuntu, with Linux.x.x-generic (recovery mode). Select the recovery mode for the same Grub version as the default. They both should have the same version number.

Next, use the scroll key, scroll down on the list, select root as shown on the screen below, and press Enter.

Next, run the commands below to mount the shell with read/write permissions.

mount -rw -o remount / 

After running the above commands, the shell should be remounted with read/write permissions. Now, you can run limited commands, including password change commands for the user and root.

To reset a user password, run the commands below, replacing the username with the actual account name or the user.

sudo passwd username

When you run the above commands, you’ll be prompted to create and confirm a password for the account name you mentioned. Create it, and you’re done.

Next, type reboot to restart the desktop or server and begin using the new password you just created.

This is how one resets a user or root password on Ubuntu servers and desktops.

Conclusion:

This post showed you how to reset forgotten passwords on Ubuntu Linux. Please use the comment form below if you find any errors above or have something to add.

Like this:



11 responses to “How to reset Forgotten Password on Ubuntu Linux”

  1. Weran Avatar
    Weran

    After performing the above steps I was able to Login. Thanks for that. But now I have a different problem which I think is related to the thing which I did to change my password which is:
    “Enter Password to unlock your login keyring”
    How can this be resolved…..?????

  2. Len Gauthier Avatar
    Len Gauthier

    After about 8 hours and many days trying to reset a forgotten password on Xubuntu I finally found your site and solution, There were many similar sites but all had slight mistakes that didn’t all terminal to accept. Yours was well explained and really easy to follow,

    Thanks very much and keep up the good work. Len

  3. Bidali Alex Avatar
    Bidali Alex

    One love, just successful changed my password. Great thanks to this forum.

  4. Abdullah Alasmari Avatar
    Abdullah Alasmari

    Still asking for my password

    1. peter simpson Avatar
      peter simpson

      When I drop to root it still wants a password!

  5. NELSON Deshotel Avatar
    NELSON Deshotel

    DID NOT WORK FOR ME IN LUBUNTU

  6. Adeel Tahir Avatar
    Adeel Tahir

    Thank you

  7. Irfan Zafar Avatar
    Irfan Zafar

    Sir, I forget my Koha password in server and i have not registered koha for rest password, some options are not working (like recovery menu ) please help me about it.

  8. Alan Light Avatar
    Alan Light

    Got thru stages
    Advanced options for Ubuntu
    Ubuntu recovery mode
    drop to root shell etc.
    Then the many lines of text-
    After that all I have is a request to enter my password or alternative
    Control-D
    I cannot proceed beyond this stage
    Appreciate some help
    Regards
    Alan Light

    1. Akash Avatar
      Akash

      Me to the same problem.

      After that all I have is a request to enter my password or alternative
      Control-D
      .
      Please help me

  9. harry Avatar
    harry

    i have followed all the instructions. after i have done the
    passwd command, the next line is “enter a new UNIX password;:

    keying will not produce in letters or numbers.

    what is wrong?

Leave a Reply to harry Cancel reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.