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. :)
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.
https://github.com/foosel/OctoPrint/wiki/Configuring-Access-Control
Near the bottom, it says to rerun the wizard, do the following:
firstRun: true. It should be there already set to false in your case.I would also: sudo service octoprint restart
Perfect! Thanks. I guess this isn't a feature request then.
@kareem613 as the bot kindly told you, it wasn't marked as a feature request by you in any case ;)
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
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
And after having read up on the ticket again, this is also not related to the login credentials discussed here ;)
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.
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.
Most helpful comment
https://github.com/foosel/OctoPrint/wiki/Configuring-Access-Control
Near the bottom, it says to rerun the wizard, do the following:
firstRun: true. It should be there already set tofalsein your case.I would also:
sudo service octoprint restart