top of page
Search

I lost my Ubuntu Password

  • Writer: Nishant  Sachdeva
    Nishant Sachdeva
  • Jul 19, 2020
  • 2 min read

Updated: Jul 26, 2020

Was-sup Avid-learners!

So this last month, I installed a Virtual Machine which ran Ubuntu. However, as it happened, I did not have occasion to use it for over a month. When I tried to login the next time, as luck would have had it, I had by then, forgotten my password. This became a problem as there was no way Ubuntu was going to let me into my system without clearing up the authentication stage.


Trying to remember a password this old was always going to be a dead-end task, and deleting the virtual machine to give way for a new one was equally if not more cumbersome, so I got to some digging in an attempt to discover is there was anyway I could change the password itself.


And, as it turned out, well yes, you indeed can change your Ubuntu Admin Password without having logged into your system yet.


Following are the steps which you can follow if you, like me, have forgotten your Ubuntu Admin Password and are not willing to go through the drudgery of installing and configuring a new virtual device from scratch


  • While booting up, press and hold your SHIFT key so as to get directed to the RECOVERY MODE menu. Timing this can be a bit tricky and you may have to try again.

  • The menu displayed will have a list of Ubuntu versions , and some of them will have "recovery mode" written in brackets alongside them .

  • Hit the down arrow key till you get to the second entry from the top. This will mostly be your Linux version with the recovery mode. Once you get there, press Enter.

  • You should see the "Recovery Manual" Menu bar with the following words as it's heading.

Recovery Manual : Filesystem state READ ONLY

  • Use the arrow keys to scroll down to "root" and click Enter

  • You should see a shell-like prompt that looks like this

root@ubuntu:~#
  • Here we noticed that the filesystem is in the READ only mode. So , first we remount it in the Read and Write Mode. For this, type

mount -rw -o remount /
  • After this step, we change our password . You should expect to see the following steps


mount -rw -o remount /
root@ubuntu:~# passwd { username }
Enter new UNIX password:
Retype new UNIX password:
passwd: password updated successfully 
root@ubuntu:~#
  • Enter your username with the "passwd" command. Then type and retype your new Ubuntu password. After this , press Enter.

  • Once you are done with this stage, you can Reboot your machine, and voila, you will be able to enter your system using your new password.


PS:

It is often said that this is a security vulnerability in Ubuntu. The thing is, you have to note that these steps can only be performed if someone is physically present on your system. And well, if someone with malicious intent has access to your PC, then, for all that is real, they can cause far serious damage than a mere change of password. So be careful who you give your system's physical access to. These steps that were performed by you can also be performed by someone else.

Peace


For more information on password resets you can refer to:

For more information on recovery modes, you can refer to:



 
 
 

Recent Posts

See All

Comments


Post: Blog2_Post

Subscribe Form

©2020 by Avid. Proudly created with Wix.com

bottom of page