There are actually two passwords that may need to be reset, and it is possible both will need to be reset.
The first password is the password for the pi itself. In order to reset any passwords, the first step is to log into the pi using ssh. To do that use a ssh client like putty. Below is a pic of the screen you would see when launching putty. You should not need to modify any of the options, just put the IP address of the Pi in the field and then click Open. It will pop up a box asking you about saving the key (yes), and then the terminal window will open where you can log in to the Pi.
If you do not recall the password, then it can be reset using the info here.
To summarize what is explained in that link, the process is to:
1. power off the pi, remove the MicroSD card, and put that in a PC.
2. Then in the drive called "boot", create a file named "octopi-password.txt"
3. In that text file ("octopi-password.txt") you only need the password you want to set for the "pi" user, nothing else. So it will be one word only in this file.
4. Now take the MicroSD out of the PC, install it in the pi and boot it.
5. You can now log in again using SSH, with username "pi" and the password you set in the file "octopi-password.txt".
To reset the password used to access the Octoprint web server running on the Pi...
The second password that may need to be reset is the one most people use when they log into the octoprint webserver, and that is done using the method described here:
The long-winded explanation of that process is to log into the pi via ssh using username "pi" and password (as described above). Then the following needs to be done:
1. Delete ~/.octoprint/users.yaml (you can view whats in there using more ~/.octoprint/users.yaml in case you just need to recall the username that was used):
2. Edit ~/.octoprint/config.yaml using nano (which is already installed), and then find "firstrun" and replace "false" with "true". This will cause the Octoprint server to produce the initial setup dialog (on the next restart). where the username and password can be entered again. Be careful editing this file though, since spaces matter, all that is needed is to change the one word from false to true. If you need to go back, just Ctrl+x, and to search for a word use Ctrl+w (then enter the word you are looking for). When satisfied with the changes, just write the file use Ctrl+o and then Ctrl+x.
If you run TouchUI you may need to update one more thing...
When TouchUI was initially set up, it asked for the username, which would allow it to autologin to the Octoprint server. If the username was changed for whatever reason, it will no longer auto-login. To fix that, the ~/.octoprint/config.yaml needs to be edited. Specifically, look for "accessControl:" near the top, and then under that will be "autologinAs:" with a username. So you guessed it, gotta change the username to match the new one. Also check that "autologinLocal:" is "true".
Be careful editing this file though, since spaces matter, all that is needed is to change the username. If you need to go back, just Ctrl+x, and to search for a word use Ctrl+w (then enter the word you are looking for). When satisfied with the changes, just write the file use Ctrl+o and then Ctrl+x.