Hi

Thanks for your support! 
Andy is right, when I create a new docker image and copy the user.xml to /srv/BaseXData then I can authenticate with the credentials defined in user.xml. As the passwords are encrypted I just used the DBA webconsole to change the admin password on my local machine and then I can use this file when creating the docker image, i.e. in the Dockerfile I added the following line:

  COPY users.xml /srv/BaseXData/


I think it should be clarified in the official documentation: http://docs.basex.org/wiki/Docker#BaseX_Configuration 
(changing the admin password has no effect...)


As so far I only used the BaseX GUI and now  I'm using the docker version of BaseX for a new project I need to get a better understanding of how the server configuration and user management works.
I can still use all of my existing XQuery sciripts but some things needed to be changed:

-  In order to use the SQL module when using BaseX in the docker container the jdbc drivers need to be copied to the path /usr/src/basex/basex-core/lib/ and not as one might guess  to /lib/. 

- In the import module statement the absolute path is needed, e.g. 
  import module namespace api="http://www.domain.com/myapp" at "/srv/BaseXWeb/modules/util.xqm";


Regards
Mike

From: Andy Bunce <bunce.andy@gmail.com>
To: Jens Erat <jens.erat@uni-konstanz.de>
Cc: Mike Cobo <mikecobo@yahoo.com>; "basex-talk@mailman.uni-konstanz.de" <basex-talk@mailman.uni-konstanz.de>
Sent: Wednesday, April 6, 2016 11:27 AM
Subject: Re: [basex-talk] Non-default admin user/pw for BaseX on Docker image

Hi,
My understanding is basexhttp does not use .basex or options for user details.
It always runs as user admin with password from data/users.xml.
If data/users.xml does not exist or does not specify an admin password then admin is also used as the password. [1],[2]

/Andy
[1] http://www.mail-archive.com/basex-talk%40mailman.uni-konstanz.de/msg05469.html

On 5 April 2016 at 16:35, Jens Erat <jens.erat@uni-konstanz.de> wrote:
Hi Mike,

I'll have a look at that this weekend. Some wild guesswork: this might
be a permission issue with the .basex file. It might also be that I
messed up somewhere, but I verified changed .basex files have been
working (actually, I'm using one myself in a project).

Could you share the example project including Dockerfile and the .basex
file as tar or zip archive, preserving permissions (tar -p flag)?

Regards,
Jens

Am 05.04.2016 um 17:08 schrieb Mike Cobo:
> Hi BaseX team, hi all
>
>
>
> I want to create a docker image based on the existing basexhttp image,
> but with other credentials for the admin user. For this reason I added
> an edited .basex file with changed password (here: mypassword) to the
> new docker image:
>
> .basex:
>
> ...
> # Client/Server Architecture
> HOST = localhost
> PORT = 1984
> SERVERPORT = 1984
> USER = admin
> PASSWORD = mypassword
> SERVERHOST =
> ...
>
> Dockerfile:
>
> FROM basex/basexhttp:latest
> MAINTAINER Mike <myemail@mail.com>
> COPY .basex /srv/
> VOLUME ["/srv/BaseXData", "/srv/BaseXWeb"]
>
>
> After starting the docker container I checked if the edited file can be
> found under the path "/srv/.basex". The file is there but when I want to
> login to the database (or run an XQuery script via the browser) I cannot
> login with admin/mypassword. The erreor message is:
>
> *Connection failed: Access denied.  *
>
> But I can still use the default user/pw (admin/admin) to connect.
>
> Why is the changed .basex file not loaded/parsed when starting the BaseX
> (http) server on the docker container? Should the file be copied to a
> different path?
>
>
> Best regards,
> Mike
>
>

--
Jens Erat
Universität Konstanz
Kommunikations-, Infomations-, Medienzentrum (KIM)
Abteilung Basisdienste
D-78457 Konstanz
Mail: jens.erat@uni-konstanz.de