-
-
Notifications
You must be signed in to change notification settings - Fork 502
How to Reset Your Admin User Password
If you cannot log in to Mycodo because you forgot your password, you have a few options to access your system again. Unless you have another admin account that you can log in and change your other user's password, you're going to have to either A) Reset your password with your email address, B) Reset your password with a reset code, C) Delete the admin user from the database then restart the web UI to induce the creation of another admin user, or D) Delete your entire database and restart the web UI to create a new database and initialize the admin user creation page.
This option is the easiest but requires you already have SMTP set up in Mycodo so it can send email and you have a valid email address associated with your account.
- On the login page, select "Forgot Password".
- Select "Email Reset Code", enter your user name, and click Submit.
- Check your email for the reset code. This code will be good for 30 minutes.
- Enter the reset code and your new password and click Change Password.
This option requires you to have access to the file system Mycodo is installed on. A file will be created that includes a reset code and instructions.
- On the login page, select "Forgot Password".
- Select "Save Reset Code to File", enter your user name, and click Submit.
- Log in to the system Mycodo is installed on and open /home/pi/Mycodo/password_reset.txt to find your reset code. This code will be good for 30 minutes.
- Enter the reset code and your new password and click Change Password.
- Download SQLiteStudio
- Download your mycodo database at ~/Mycodo/databases/mycodo.db to your local computer
- Open the database with SQLiteStudio and delete all admin users in the User table, then save
- Upload mycodo.db back to the remote system
- Restart the web UI with
sudo service mycodoflask restart
- Visit your web interface and you will be presented to create a new admin user
Note: Deleting your database will mean you will be starting from scratch and will need to add all your inputs, PIDs, etc. again.
- Stop the Mycodo daemon with
sudo service mycodo stop
- Delete your Mycodo database with
rm -rf ~/Mycodo/databases/mycodo.db
- Restart the web UI with
sudo service mycodoflask restart
- Visit your web interface and you will be presented to create a new admin user
- Start the Mycodo daemon with
sudo service mycodo start