Pages

Friday, May 24, 2013

Reset forgotten User password in Linux

Reset forgotten User password in Linux do the following steps.

1) Boot your system and hold SHIFT key for GRUB loader menu in the single OS system. But in the case of  Dual boot it is not necessary
2) From GRUB menu select Recovery Mode and press 'e' to get Edit mode
3) Edit and Add rw init=/bin/bash the line starting with 'LINUX'. see the below line.

Before Editing
linux  /vmlinuz-3.5.0-17-generic root=UUID=[letters and numbers] ro quiet splash $vt_\handoff

After Editing
linux  /vmlinuz-3.5.0-17-generic root=UUID=[letters and numbers] rw init=/bin/bash

4) Press Ctrl+X to Reboot
5) An command prompt will appear in some time and which you can use to set new password as below -
   passwd yourusername
   Enter new password :
  Confirm new password: 

6) Restart your system. This may be by Pressing Ctrl+X or Alt + Ctrl + Delete
7) Proceed with normal boot process. After boot process finishes it will prompt you for user name and password.

No comments:

Post a Comment