H2CK/webtrees

Admin User Creation

ANOstROY opened this issue · 6 comments

I am unable to login using the admin credentials I specified when creating the container. The error message reads:

The username or password is incorrect.

I see there are no records in the user database table, but I'm not sure if that is where the admin credentials are stored.

Here is my Run command on Linux AMD64 and Docker version 18.06.0-ce. This was created about 13 days ago, so I'm thinking this is image v2.0.10-0.

docker run -d \
 -p 8088:8079 \
 --name webtrees \
 -v /webtrees/data:/var/www/html/data \
 -e GROUP_ID=1000 \
 -e PORT=8079 \
 -e UPDATE_ON_START=TRUE \
 -e DB_USER=webtrees_user \
 -e DB_PASSWORD=DBPassword \
 -e DB_HOST=10.10.10.10 \
 -e DB_PORT=3307 \
 -e DB_NAME=webtrees_db \
 -e WT_ADMIN=AdminName \
 -e WT_ADMINPW=AdminPassword \
 -e WT_ADMINMAIL=user@mail.com \
 --restart always \
 dtjs48jkt/webtrees

I see no one else has reported this issue, so it must be something I am doing wrong.

Thank you in advance!

H2CK commented

I will try to setup this constellation on my site and test it. Do you have any special characters (like %_<>...) in your admin username or password?

H2CK commented

I did try to setup your environment on my site and it worked. I am not sure what your problem is.

Following some hints you should try:

  • Please try to use the latest version v2.0.10-3 of webtrees
  • Please check the container logs if the initial db is really created. You should find INFO exited: initialize_db_app (exit status 0; expected) on success.
  • How is your database setup? Does the DB user have enough rights to create the webtrees database? Are you using the root user? Is the database reachable?
  • What I did not test might be some special characters in your username and/or password

What I did to test the functionality:
Run the database with
docker run --name mysql -p 3306:3306 -e MYSQL_ROOT_PASSWORD=rootpw -d mysql:latest

Run webtrees with
docker run -d -p 80:80 --name webtrees -e DISABLE_SSL=TRUE -e PORT=80 -e DB_USER=root -e DB_PASSWORD=rootpw -e DB_HOST=192.168.115.124 -e DB_PORT=3306 -e DB_NAME=webtrees_db -e WT_ADMIN=admin -e WT_ADMINPW=admin dtjs48jkt/webtrees:v2.0.10-3

When you open the browser you are able to enter the credentials admin/admin and create your first family tree.

Thanks so much for the reply. I will try your suggestions. I did use the following special characters:

*, ^, @

I will eliminate those and try again. Also my database is on another host. I did confirm the privileges and the tables were created. However, I will create a MySQL container as you have done.

Again, much appreciated!

Hello. This is working now. I created a MySQL container on the same Docker host as webtrees.

Thank you and happy holidays.

H2CK commented

I do not think that the problem is caused by using a MySQL DB as docker container or not. Even this should not be caused if the database runs on a different host.
I personally think the special characters you used might have caused the problem. I will do some tests in the next days to find out which special character might have caused the problem.

H2CK commented

I performed during the day some tests (using v2.0.11-0) with special characters in the password (each test with a special character). All of the special characters (*, ^, @) worked and I was able to login.
I will close this issue therefore.