Access problem with Octoprint. User and pass

Hi guys, im new here. Im from Italy and im sorry for my bad english.
Ive a problem! I cant sign in into the octoprint server. I dont remember user and pass. Ive tried everything. Someone knows a solution?! Thank u. image|666x500

Hi @Cacio89,

you may have a look at this:

1 Like

I did it yesterday but nothing. I used the program “putty” to go into the command line and when i put the commands nothing happened. The same, with other commands

At the prompt (pi@octopi), can you type in ls -a and share the results?
And also ls ~/.octoprint -a

Here it is

There is no more useres.yaml to remove...

so, what can i do now?

When you login to the web front end now, you do not get the setup menu again?

Nope. I have this

im going crazy. the page ask me for a log in again.

The guide tells you to do three steps. You only did the first, removing the users.yaml (or maybe for some reason it was already gone).

Continue with the other two steps.

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

I did the three steps. But ive always the log in page

no more ideas?! what if i buy a new sd or a new raspberry?!!

@Cacio89 When you first setup OctoPrint (during the Setup Wizard), did you create a user or not for that "User Access" screen?

@OutsourcedGuru Yes i did it. i cliked on “enable user access” during the first setup . But I finally solved the problem and now everything works! But i did the user access again but without problem this time. Anyway, thanks for everything.

Hey Cacio, I am having the same problem. May you help me please? How could you have it fixed? Because I saw you were also following that steps and didn't work for you too.

Hey there. I just ran into the same Problem and was completely stumped. Then I just opened the page in a different browser and it worked. Also hitting reload made it work. So I guess the login page was still in my browser cache from the last time I used octoprint. Hope it helps.

1 Like

I had the same problem, all started with the user name and password not recognizing for no apparent reason. I got the " no such file or directory" with the rm ~/.octoprint/users.yaml command. Followed the rest of the instructions and still had a failed login. I think it might of been my browser or pc preventing the setup wizard from popping up on the reboot, in the setup wizard you change the user/passwords or disable the need for logging in. I came to the conclusion after accessing the octoprint from my iphone's safari browser and the setup wizard finally popped up. I tried firefox, chrome, explorer and the setup wizard never appeared on my pc and I didn't get a notification that it was blocking a popup.
I also had to enable ssh on the sd card by creating a ssh file with no extension in the boot. I couldn't log in through ssh with the default user: pi password: raspberry, so I had to created a new password with a text file on the sd card named "octopi-password.txt" with the new password on one line.
Every step of the way it fought me, not for sure if the sd card got corrupted or what but I never changed or lost log in info in the first place.

Hope this helps, good luck.

I realize this is an old post, but since I finally figured out a solution after many hours of trying, I figured I'd post what worked for me.

I tried the initial steps and there was no users.yaml file, so I adjusted firstRun: true, which kept returning me to the login page and was asking for a username and password I didn't have.

Here's the solution:

  1. ssh into the pi
  2. navigate to the .octoprint directory
  3. open the config.yaml file with nano or whatever text editor you use
  4. add the following lines under the api: section so that it looks like this:
api:
  allowCrossOrigin: true
  enabled: true
  key: abcdef...
  1. run sudo service octoprint restart
  2. Refresh the browser page and it should take you to the wizard :slight_smile:

I think the issue is that I was upgrading from a very old version of Octoprint and the CORS permissions may not have been present in the config.yaml file back then. Anyway, I hope it helps somebody!

1 Like

man good call! i fought this for a couple hours trying everything !! they need to add this info to main octoprint webpage... could of literally saved me so much time ! also note everyone back up your profiles if you havent. for me we had power surge and for some reason any time this happens it messes up the sd card in some way or another on my pi ususally its the wifi settings no idea why