Purpose: This procedure outlines the steps to reset your Pi-Star password if you have forgotten it. This is the password you enter when you click the Configuration menu on the Pi-Star dashboard. This procedure saves you from re-imaging your SD card and starting over from scratch. This procedure cannot be done remotely. You need physical access to the Raspberry Pi that’s running your Pi-Star hotspot.
Requirements:
- You will need a monitor and keyboard connected to the Raspberry Pi that’s running your Pi-Star hotspot
- You will need another computer that’s capable of reading the SD card that has the Pi-Star image installed
Steps:
1. Power down your Raspberry Pi by unplugging the USB power cable
2. Remove the SD card from the Raspberry Pi
3. Insert the SD card into another computer. If you’re using a Windows computer for this step you will need to cancel any pop-ups asking if you want to format a disk.
4. Locate and open the following file on the SD card
cmdline.txt
5. Add a space and the following text to the end of the line
init=/bin/sh
6. Save the file
7. Safely eject the SD card from your computer
8. Connect a monitor and keyboard to your Raspberry Pi
9. Insert the SD card back into your Raspberry Pi
10. Plug the USB power cable into your Raspberry Pi
11. You should see a bunch of text scroll past on the monitor as the Raspberry Pi boots up
12. Once the Raspberry Pi as completed booting you should see a flashing cursor. Press the Enter key on the keyboard. You should be presented with a # sign prompt.
13. Type the following command at the # sign prompt. This will log you in as the root user with no password needed.
su
14. Type the following command
mount -t proc proc /proc
15. Type the following command (that’s an oh, not a zero)
mount -o remount,rw /
16. Type the following command
passwd pi-star
17. Follow the prompts to enter your new pi-star password
18. After resetting the pi-star password unplug the USB power cable
19. Remove the SD card
20. Insert the SD card into another computer. If you’re using a Windows computer for this step, you will need to cancel any pop-ups asking if you want to format a disk.
21. Locate and open the file named“cmdline.txt”
22. Locate the text below and delete it (this is the text you added in step 5, don’t forget to delete the space before the i)
init=/bin/sh
23. Save the file
24. Safely eject the SD card from your computer
25. Insert the SD card back into your Raspberry Pi
26. Plug the USB power cable into your Raspberry Pi. Your Raspberry Pi should boot up.
******* The following steps can be performed using the keyboard plugged into the Raspberry Pi or by connecting to the Raspberry Pi over SSH ********
27. Login with username pi-star and the new password you set in step 17
28. Type the following command
rpi-rw
29. Type the following command
sudo htpasswd -c /var/www/.htpasswd pi-star
30. Follow the prompts to enter the same pi-star password you entered on step 17
31. Type the following command
exit
32. Confirm you can login to the Pi-Star dashboard using the new password