Argon2 Invalid Hash (mnemnosyne sync)

90 views
Skip to first unread message

Dorian Minors

unread,
Jan 5, 2022, 10:02:25 AM1/5/22
to mnemosyne-proj-users
Hello,

I've been trying to get my sync server working, and having an odd error related to the password hashing. Exhausted my own debugging skills.

Installed mnemosyne, and running it headless as a sync and web server (error does not change if only running as sync server).

To set username and password, I have tried both to set the variables in config.py and directly in config.db. In either case, sometimes immediately and sometimes after a single successful sync, I get the following error:

```
Traceback (innermost last):
    File "/usr/local/lib/python3.8/dist-packages/Mnemosyne-2.8-py3.8.egg/openSM2sync/server.py", line 312, in put_login
        if not self.authorise(client_info["username"],
    File "/usr/local/lib/python3.8/dist-packages/Mnemosyne-2.8-py3.8.egg/mnemosyne/libmnemosyne/sync_server.py", line 53, in authorise
        ph.verify(hashed_password, password)
     File "/home/dorian/.local/lib/python3.8/site-packages/argon2/_password_hasher.py", line 212, in verify 
        raise InvalidHash()
argon2.exceptions.InvalidHash
```
The password I'm using to try and sync matches what's in config.py/config.db. I have even changed it to e.g. a single letter to be certain.

I have tried this a few times now, completely eliminating the mnemosyne folder and starting fresh, with no success.

I have now exhausted my debugging ability. Any ideas what I've done here?

One thing that might be important is I had to install argon2-cffi to get mnemosyne working on Ubuntu.

Warm regards,

Dorian

Peter Bienstman

unread,
Jan 5, 2022, 10:39:42 AM1/5/22
to mnemosyne-proj-users
Hi,

My advice would be to set up a server first using Mnemosyne's GUI, so that the correct hash is generated. Then, you can transfer the hashed password to the headless server. 

Cheers, 

Peter 

--
You received this message because you are subscribed to the Google Groups "mnemosyne-proj-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mnemosyne-proj-u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/mnemosyne-proj-users/fb49bbdd-5d9d-441f-96b1-ecdd4e5f9bf2n%40googlegroups.com.

Dorian Minors

unread,
Jan 5, 2022, 12:24:03 PM1/5/22
to mnemosyne-proj-users
Evening,

That worked perfectly, thanks.

So the point I was misunderstanding is that the password entered into config.py or config.db had to be the _hashed_ password, not the plaintext.

Warm regards,

Dorian
Reply all
Reply to author
Forward
0 new messages