(admin) password reset

Questions, comments, discussions. Over time certain topics might be moved to their own category.
Post Reply
koen
Posts: 6
Joined: Sun Feb 24, 2019 7:11 pm

(admin) password reset

Post by koen » Fri Mar 01, 2019 4:39 pm

After logging out with my admin account, I can't log back in with the auto-generated lastpass pw.
Firts time it happened I decided to delete and reinstall the docker container, but now it happened again.

first question: how can that happen?
I'm very sure I didn't overwrite my password in Lastpass, it shows no password changes in lastpass history

far more important second question: please help me reset my password!
I probably did not yet setup up the email backend right (only the part for mailing documents, not system messages)
Following the procedure in the documentation I created a config.yml containing the mailserver settingse in the media folder and restarted the container. Still no luck, also I noticed there was no config.yml-backup created as should be according to the documentation?

In another forum I found the command: mayan-edms changepassword admin --but that results in an "error opening database"

I'm on a synology NAS with docker install. I try commands via ssh into my NAS, or via the "in-browser terminal" in the docker container in DSM

What do I do?

PLEASE help, I need my docs...

User avatar
rosarior
Posts: 194
Joined: Tue Aug 21, 2018 3:28 am

Re: (admin) password reset

Post by rosarior » Fri Mar 01, 2019 11:43 pm

First you need to know the name of the Docker container running Mayan on your setup. Do:

docker ps

Then execute the password reset command but inside the Docker container.

docker exec -ti <your docker container name> /bin/bash
/opt/mayan-edms/bin/mayan-edms.py changepassword admin

koen
Posts: 6
Joined: Sun Feb 24, 2019 7:11 pm

Re: (admin) password reset

Post by koen » Sat Mar 02, 2019 7:32 am

Still no luck:

...
should only be used for development and testing, not for production.
warnings.warn(force_text(MESSAGE_SQLITE_WARNING))
Traceback (most recent call last):
File "/opt/mayan-edms/bin/mayan-edms.py", line 10, in <module>
execute_from_command_line(sys.argv)
File "/opt/mayan-edms/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 364, in execute_from_command_line
utility.execute()

...

File "/opt/mayan-edms/local/lib/python2.7/site-packages/django/db/backends/base/base.py", line 213, in ensure_connection
self.connect()
File "/opt/mayan-edms/local/lib/python2.7/site-packages/django/db/backends/base/base.py", line 189, in connect
self.connection = self.get_new_connection(conn_params)
File "/opt/mayan-edms/local/lib/python2.7/site-packages/django/db/backends/sqlite3/base.py", line 198, in get_new_connection
conn = Database.connect(**conn_params)
django.db.utils.OperationalError: unable to open database file
root@mayanedms-mayanedms1:/opt/mayan-edms/bin#

edit: I did not stop the container before the docker exec -ti command, shoul I've done that?

User avatar
rosarior
Posts: 194
Joined: Tue Aug 21, 2018 3:28 am

Re: (admin) password reset

Post by rosarior » Mon Mar 04, 2019 8:37 pm

These messages:

Code: Select all

django.db.utils.OperationalError: unable to open database file
and

Code: Select all

 warnings.warn(force_text(MESSAGE_SQLITE_WARNING))
indicate that the Mayan container is not being able to access the database container. Since the admin password is stored in the database, re-deploy the Mayan container as you did the first time (database user, host, password), and then try to reset the admin password again.

Post Reply