Forgot username to login to webpage

What is the problem?

I forgot my username to log in to the webpage

What did you already try to solve it?

I still have access to the SSH login and have tried to reset my password with this The problem being that I don't know the username that I set it up with.

I wasn't sure if there was some way that I can look at the usernames that are in octoprint and then reset the password from there. I'm still really new to this so any help would be awesome.

Hello @frizwiz!

This may help you:

I have tried this, the problemis that I don't know what the username is so whenever I what i thought it was I get "User does not exist" where is what I thought the username was.

As you have SSH access you could try looking in /home/pi/.octoprint/users.yaml

1 Like

As @andy-b said: it's from the backend via SSH, you don't need your OctoPrint username.
For SSH it is pi and raspberry (if you haven't changed them)

then do as described:

If you only have a single user set up

If you only have a single user setup in OctoPrint for which you forgot the password, the easiest way is simply resetting OctoPrint's user database and run the access control wizard again. The steps involved boil down to this:

  • remove ~/.octoprint/users.yaml
  • in ~/.octoprint/config.yaml replace firstRun: false with firstRun: true
  • restart the OctoPrint server and reload, you should be prompted to run the first time setup wizard again

If you are running OctoPi , you can use these commands to do all that:

rm ~/.octoprint/users.yaml
sed -i -e 's/firstRun: false/firstRun: true/g' ~/.octoprint/config.yaml
sudo service octoprint restart

:spiral_notepad: Note :

If you have the OctoPrint server installed on Windows, the location of the files will be %APPDATA%\OctoPrint\users.yaml and %APPDATA%\OctoPrint\config.yaml . If you have it installed on MacOS, the locations will be ~/Library/Application\ Support/OctoPrint/users.yaml and ~/Library/Application\ Support/OctoPrint/config.yaml .

Thank you for this. It worked perfectly!!

1 Like