What's new
VORON Design

Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your own topics and posts, as well as connect with other members!

Recovering RasPi Password

Rusty105

Well-known member
I am putting this here as I am using Klipper, but feel free to move if necessary.

I am trying to recover my password for the RasPi running Klipper for my Voron V0. I need to be able to SSH into the RasPi to do some software upgrades. It is a RasPi 4 running Bookworm. I have read where I can add a command line to a file then reboot the Raspi, but that needs a monitor and keyboard to make it work. The RasPi is headless. And since it is running Bookworm, there isn't a 'default' user , like "pi" as in older firmwares, I am not even 100% sure on the user name, ugh.

Is there any way to recover this without nuking the install and starting over?

thanks !!
Rusty
 
  • 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.
Seen on StackExchange. You will need to change the username pi to whatever is the default user (go to the /home directory while the SD card is on your computer to see that, you may need to use a Linux desktop; alternatively, before issuing the passwd command go the the /home directory on the terminal, the command is cd /home, then do a ls command to show the directories on it - there should be only one, which is the default user).
 
Last edited:
Seen on StackExchange. You will need to change the username pi to whatever is the default user (go to the /home directory while the SD card is on your computer to see that, you may need to use a Linux desktop; alternatively, before issuing the passwd command go the the /home directory on the terminal, the command is cd /home, then do a ls command to show the directories on it - there should be only one, which is the default user).
Yeah, I have seen this method elsewhere...... But.... I would need to set up a keyboard and monitor for the Pi. I am thinking it might be the only way? I need to find a micro HDMI to HDMI cable/adapter first.....

Rusty

On edit: oh, wait. The StackExchange link shows something different. I might be able to do that. I do have another PC running Ubuntu. that might work....
 
Last edited:
You will still need to login locally on the Rasperry Pi to complete this method, it's the only way to change the password.
 
Top