I'm trying to follow the directions in https://howtoraspberrypi.com/recover-password-raspberry-pi/.

(For future reference in case that tutorial disappears, here is the steps up to the point which I ran into trouble.)

  1. Remove SD card from Raspberry Pi (after powering off the Raspberry Pi).

  2. Plug into SD card reader on computer.

  3. Go to the root partition on the SD card and edit the contents of cmdline.txt

  4. Add init=/bin/sh to end of line, and save and close.

  5. Remove card and place back in Raspberry Pi. Connect keyboard and monitor to Raspberry Pi and start Raspberry Pi.

  6. Wait until screen freezes than type in mount -o remount, rw / to mount the root partition.

However, when I start up the raspberry pi after editing the cmdline.txt file and connecting a monitor and keyboard, it never gets to the point where I can type text. I see it booting up and then the screen goes blank.

This is the contents of the cmdline.txt:

dwc_otg.lpm_enable=0 console=serial0,115200 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait quiet splash plymouth.ignore-serial-consoles

Edit: Sometimes when I press some key on the keyboard, I am able to get a prompt:

hostname login:

I don't remember the password, so how do I get past that point?

To add, this runs on Raspbian Jessie.

  • "Wait until screen freezes" if it doesn't boot to a root prompt the OS is corrupt.
    – Milliways
    Commented Dec 2, 2019 at 2:31
  • You have tagged this post Raspbian, which is effectively meaningless - unless it is some rare issue spanning all releases Wheezy (obsolete), Jessie (unsupported and soon to be obsolete), Stretch and Buster (which is hard to visualise) specify which OS you are using as there are significant differences.
    – Milliways
    Commented Dec 2, 2019 at 2:32
  • @Milliways I retagged it as Raspbian Jessie. Although, I think this is an issue that comes up pretty often regardless of the version. Commented Dec 2, 2019 at 2:40
  • On your reproduction of cmdline.txt I don't see the init=/bin/sh at the end of the line.
    – Charemer
    Commented Dec 2, 2019 at 16:26
  • Try without quiet in cmdline.txt, it might suppress the visibility of the text input
    – Jim Danner
    Commented Dec 3, 2019 at 0:41

1 Answer 1


There is another way to reset a password. If you have attached the SD Card from the RasPi to your computer you can also modify etc/passwd and etc/shadow on the root partition. This partition is formated with an ext4 filesystem so you have to use a computer that can read this. Any linux operating system can, MS Windows and MacOS can't. How exactly modifiy the files you can look at Raspian gui unable to log in.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.