Authentication failed for nonexistent user
Closed this issue · 3 comments
Using the latest docker image for ARM64. Using latest AnkiDroid as a client.
This is what I get when creating a user after docker exec-ing into the container as either
ankisyncd user -a testuser testpwd
or going to /usr/local/bin
and then doing ./ankisyncd user -a testuser testpwd
What I expected:
...for it to actually log in.
Edit:
unsure if this happens because of the mismatch in default config location or not. (see rootdir)
However, when I try to change the config location, it throws another exception:
Edit2: I can confirm that after copy-pasting, logging in works as expected.
cp -r /usr/local/bin/* /app
Please either make documentation clearer, or fix the location bug.
Thanks for the report.
That how to add user in container has been documented. in https://github.com/ankicommunity/anki-sync-server-rs/pull/41/files#diff-1d6b40a4d7c23ed086bafff99805b963b6e057b073e432b7d4d89954ae64a756
docker exec -it ankisyncd /bin/bash
ankisyncd user -a username password
exit
note:remove created containers before new journey.
that's the issue however, ankisyncd user -a username password
, doesn't always work since by default, the root_dir
is set as .
whereas it should be /app
and passing custom location to ankisyncd
via the -c
flag results in error given above.
Unless I'm missing something obvious.
I think I found the reason. WORKDIR
is not set,so user will not in /app when being logged into the shell of the container.
there is a quick fix.After logging into the shell,you will be in /,so you should enter /app by running cd /app
.
And then you can perform actions on adding user