Reset Raspberry Pi Password

After a few months of setting up last Pi project, the time for maintenance has come.

But ooh! I forgot the password ?

And I had to reset it. So if this happened to you, follow these steps to fix it up.

  1. Plug the SD card into your PC
  2. Open /etc/shadow file with any file editor
  3. Find the line where pi user or whatever your user is
  4. Remove the hash after the first colon to the second colon and put this instead
  5. the new password is 123456789

or you can take your user hashed password from your system shadow file and replace it with pi user hashed password