Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Password reset #1063

Closed
kareem613 opened this issue Sep 16, 2015 · 9 comments
Closed

Password reset #1063

kareem613 opened this issue Sep 16, 2015 · 9 comments
Labels
incomplete Issue template has not been fully filled out, no further processing until fixed

Comments

@kareem613
Copy link

It would be good to have the ability to reset a forgotten password.
Even a wiki entry on how to do it from the command line would cut it.

Helps avoid being completely locked out of the interface.. like I am right now. :)

@GitIssueBot
Copy link

Hi @kareem613,

It looks like there is some information missing from your ticket that will be needed in order to process it properly. Please take a look at the Contribution Guidelines and the page How to file a bug report on the project wiki, which will tell you exactly what your ticket has to contain in order to be processable.

If you did not intend to report a bug, please take special note of the title format to use as described in the Contribution Guidelines.

I'm marking this one now as needing some more information. Please understand that if you do not provide that information within the next two weeks (until 2015-09-30 03:10) I'll close this ticket so it doesn't clutter the bug tracker. This is nothing personal, so please just be considerate and help the maintainers solve this problem quickly by following the guidelines linked above. Thank you!

Best regards,
~ Your friendly GitIssueBot

PS: I'm just an automated script, not a human being, so don't expect any replies from me :) Your ticket is read by humans too, I'm just not one of them.

@markwal
Copy link
Member

markwal commented Sep 16, 2015

https://github.com/foosel/OctoPrint/wiki/Configuring-Access-Control

Near the bottom, it says to rerun the wizard, do the following:

  1. edit ~/.octoprint/config.yaml and set firstRun: true. It should be there already set to false in your case.
  2. remove ~/.octoprint/users.yaml

I would also: sudo service octoprint restart

@kareem613
Copy link
Author

Perfect! Thanks. I guess this isn't a feature request then.

@foosel foosel closed this as completed Sep 22, 2015
@foosel
Copy link
Member

foosel commented Sep 22, 2015

@kareem613 as the bot kindly told you, it wasn't marked as a feature request by you in any case ;)

@flowchartsman
Copy link

If anyone is curious, there's a shortcut way to do it, so long as you have UI access. Simply go to settings -> server and change the "Restart System" command from sudo shutdown -r now to echo "pi:pi" | sudo chpasswd, then click -> "Reboot System" -> Proceed. Just make sure to change the restart command back when you're done. No telling how long this will work, as it's definitely a security issue and should probably be fixed.

@foosel
Copy link
Member

foosel commented Jan 31, 2018

That being possible is caused by passwordless sudo being allowed in Raspbian and hence OctoPi incl 0.14 by default, and that is addressed in guysoft/OctoPi#345

@foosel
Copy link
Member

foosel commented Jan 31, 2018

And after having read up on the ticket again, this is also not related to the login credentials discussed here ;)

@foosel foosel added the incomplete Issue template has not been fully filled out, no further processing until fixed label Feb 20, 2018
@lhartmann
Copy link

lhartmann commented May 12, 2018

Just forgot my password. Here is how I recovered WITHOUT RESETTING ALL CONFIGS.

SSH into the user running octoprint, then run

$ grep salt .octoprint/config.yaml

You wil get "salt: SomeString" as a response. Copy that string then run:

echo -n MyNewPasswordSomeString | sha512sum

You will get the octoprint-internal hashed password. Copy it, edit .octoprint/users.yaml and replace the password for the desired user.

Login on the web page using MyNewPassword as the password.

Creating a simple octoprint-passwd.py should be easy for someone who, unlike me, actually knows python.

@Glastis
Copy link

Glastis commented May 23, 2020

Here is a one-liner pass reset, if you only have one user:

NEW_PASSWORD='my new password' ; sed "s/password:.*/password: $(printf '%s%s' ${NEW_PASSWORD} "$(grep salt .octoprint/config.yaml | awk -F ' ' '{print $NF}')" | sha512sum | awk -F ' ' '{print $1}')/" ~/.octoprint/users.yaml

Just change my new password by what you want.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 25, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
incomplete Issue template has not been fully filled out, no further processing until fixed
Projects
None yet
Development

No branches or pull requests

7 participants