@Babacar_Gueye - welcome to to forum! I see this is your first post. Thanks so much for asking your question. Every time the community engages here, the more we we’re able to solve your problem as well as help those who follow with the same problem later.
I assume you’re in a self hosted or local set up situation, and you don’t know the password to be able to log in to the CHT web GUI as an admin. Please let me know if this isn’t correct!
If you haven’t done any customizations, then the password may simply be password
, which is the default in our docker-compose file.
Alternately, you can check the COUCH_URL
environment variable with an echo
call:
echo $COUCH_URL
http://admin:password@localhost:5984/medic
In this case, it is simply password
for me in my development setup.
Finally, if you’re really stuck, there’s a more involved process to forcefully reset the password. Use this method with caution as any other services that are dependent on the old password will need to be updated as well.
Let’s update the medic
user’s password to changeme
.
- List your containers to find the right one:
docker ps --format="{{.Names}}"|grep medic medic-os helper_test_medic-os_1
- In this case we want the default
medic-os
container, so let’s get shell on it:docker exec -it medic-os bash
- Edit the CouchDB
local.ini
file. I likevim
:vim /srv/settings/medic-core/couchdb/local.ini
- Remove the pbkdf2 hash for the
medic
user and replace it with the plaintext password. When CouchDB reboots, it will re-hash this for you. Change this:
To this:medic = -pbkdf2-8333fed3be2f6d733724bd7e16b50018d31b26f5,54b5a496afb8cc950ea4d5e9d49532ae,10
medic = changeme
- Finally, restart CouchDB:
/boot/svc-restart medic-core couchdb
Please let us know if I made the wrong assumption, if you’re still stuck or if this solved your problem!