geopython / GeoHealthCheck

Service Status and QoS Checker for OGC Web Services
https://geohealthcheck.org
MIT License
83 stars 71 forks source link

Changing the password of the admin user #436

Closed Myrdrahl closed 1 year ago

Myrdrahl commented 1 year ago

I cannot figure out, how to change the password of the admin user. What I've done so far.

  1. Running geohealth in docker - and it seems to be working fine.
  2. Tried to follow this: https://geohealth.test.artsdatabanken.no/static/docs/admin.html#passwords - to change the password of the admin user.

I "enter" the running container and run the commands listed and it seems to be working fine, up until this point:

$ sqlite3 data.db

or psql equivalent for Postgres

sqlite> UPDATE user SET password = '' WHERE username == 'myusername';

bash: sqlite3: command not found

So it seems like sqlite isn't installed in the image, even though it says in the documentation that it should be default. Could someone please help me see what I'm missing here?

justb4 commented 1 year ago

The image/container only contains the sqlite3 library and Python bindings, not the utility program sqlite3. This is a separate install. You may want to try 'apk add sqlite3' first within the container. Or install it on your host as I suggest 'data.db' is mounted from a locl/host file with Docker? Otherwise it is only available during the Container lifetime.

Myrdrahl commented 1 year ago

Thanks for the tip - this solved it! The correct name of the package is "sqlite". I still find it extremely strange, that the image doesn't contain the necessary tool to change the the default setting of admin/admin for user/password - or if not, that could've been clearly stated somewhere in the documentation. :)

You saved me a lot of frustration, thanks again!

justb4 commented 1 year ago

@Myrdrahl good to hear! See also my Gitter comment on this.

gioman commented 9 months ago

@justb4 I was also able to change the password for a docker-composer (postgresql) install with

https://docs.geohealthcheck.org/en/latest/admin.html#passwords

still is not clear why the same do not work by editing the Dockerfile and rebulding

https://github.com/geopython/GeoHealthCheck/blob/master/docker/README.md#build

after all there are configs that do indeed change doing that.

I don't see any comment fro you here https://gitter.im/geopython/GeoHealthCheck?at=632059136837563d1cd01df0

just a user asking the very same thing, but no answer

image