0

i recently got my raspberry pi4 and I forgot the password of my raspberry pi and I don't have any other linux device to reset my password editing cmdline.txt and then booting with a monitor and keyboard attached to run passwd pi, So is there any way I can change my password without linux device?.

Thanks!

Milliways
  • 59,890
  • 31
  • 101
  • 209
Tigron
  • 3
  • 2
  • A windows device will do just as well. This guy did it on a windows. THis is for ununtu, but it will work on raspberry pi os too. https://www.youtube.com/watch?v=S3evsjMt9EA – random_ubuntu_user Nov 26 '21 at 19:57

1 Answers1

2

@Tigron, have you even tried to plug your sd card into another computer? On Windows the boot partition of the Pi is visible without formatting and cmdline.txt is in the boot partition!

Quizzer515SY
  • 109
  • 4
  • yeah but I don't think you can reset the password by only changing cmdline.txt – Tigron Nov 26 '21 at 19:04
  • Have you done some research online yet? Asking a question on Stack Exchange shouldn't be anyone's first go-to. Here is a webpage from this forum that answers your question: link. In case the link breaks, here are the steps as written by @Xilef: – Quizzer515SY Nov 26 '21 at 19:13
  • 1
    "Power down and pull the SD card out from your Pi and put it into your computer. Open the file 'cmdline.txt' and add 'init=/bin/sh' to the end. This will cause the machine to boot to single user mode. Put the SD card back in the Pi and boot. When the prompt comes up, type 'su' to log in as root (no password needed). Type "passwd pi" and then follow the prompts to enter a new password. Shut the machine down, then pull the card again and put the cmdline.txt file back the way it was by removing the 'init=/bin/sh' bit." - @Xilef – Quizzer515SY Nov 26 '21 at 19:13
  • oki ty!, ill try – Tigron Nov 26 '21 at 19:25