Saturday, July 11, 2015

Ubuntu 14.04 Lost Password recovery

There are cases when you forget the login password of your Linux machine, as this case which happens to my friend who is new to Linux, after installing the Linux server he didn't remember the password of the user he created during installation, so he was planning to re-install the server, there is no need for doing re-installation, just follow the following procedure to recover your password.


  1. Boot your system and choose Advanced Options for Ubuntu,


    2.   Then, choose Recovery mode,


   3. It will take you to different recovery mode options,

  4. From Recovery Menu Options, choose to Drop to root shell prompt


  5. It is going to drop you on shell prompt, you need to run the following         
      commands to change you password.

       i. First is to mount root file system
           # mount -rw -o remount /
  
       ii. In case you don't remember the user you created during installation, 
           check the created users in the system by running the following
            # ls  /home/

          Output may differ, according to the user created, for this case of mine,   there was only one user called silas

       iii. Change the password of the existed user
             # passwd silas

        iv. After changing the password your done, now reboot your system
              # reboot


Hope is going to help someone, Enjoy!