Forgotten raspberry pi login password

Today I am working on an old raspberry pi (model B, original version) and need to get this project up and running, but I have forgotten the password.

No problem.

Let’s take the SD card and edit the `cmdline.txt` file in the root directory and add `init=/bin/sh` to the end of it (make sure there is a space before it).

Put it back into the pi and reboot.

On the pi, type:

mount -o remount, rw /
passwd pi

and enter your new password. Once done, sync the drive and exit

Leave a comment