Raspberry-Pi : Password Reset-Pi

 

It happens... In order to connect to the Pi remotely it is strongly recommended to change

the password. You probably have several SD cards, maybe different passwords, ID's and

next thing you know you forgot which password for which Micro SD.

 

Need to reset the password on the Raspberry Pi

 

Step 1

 

Since you can't access the Pi anyway... remove the Micro SD and plug into another PC / Raspberry Pi / Mac / Android so that you can edit the Micro SD card.

 

Step 2

 

Edit the file cmdline.txt in the boot partition  (See Connect page for the Notepad++ app. )

 

Add  init=/bin/sh  to the end of the line. Do NOT hit the Enter key, just save

 

Step 3

 

You may now eject and put the MicroSD into the Pi and power it up

 

Step 4

 

When you get to a prompt enter the following

 

mount -o remount, rw /

 

if you get any errors just try it again.

you may now run the password utility

 

passwd pi

Enter new UNIX password:

Retype new UNIX password:

passwd: password updated successfully

 

Now type

sync

exec /sbin/init

 

and finally

 

sudo halt

 

Step 5

 

Remove the MicroSD card, and edit the cmdline.txt file

and remove init=/bin/sh .