Skip to content

Instantly share code, notes, and snippets.

@tmthydvnprt
Last active January 10, 2016 15:09
Show Gist options
  • Select an option

  • Save tmthydvnprt/8319ea705d1e2a5bd971 to your computer and use it in GitHub Desktop.

Select an option

Save tmthydvnprt/8319ea705d1e2a5bd971 to your computer and use it in GitHub Desktop.
Reset a forgotten raspberry pi password

Reset a forgotten raspberry pi password

  1. Using another computer, edit the cmdline.txt file in the boot partition to include this at the end of the line:
init=/bin/sh
  1. Boot again
  2. Become root
# su
  1. Remount so shadow files are correct
root@home: mount -o remount,rw /
  1. Reset the password
root@home: passwd {username}
  1. Power down and remove cmdline.txt edits
  2. Boot again and get your Pi on!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment