# Updating default login credentials

**URL:** <https://forum.communityhealthtoolkit.org/t/updating-default-login-credentials/1178>\
**Category:** Technical Support\
**Created:** [March 5, 2021, 1:29pm UTC](https://forum.communityhealthtoolkit.org/t/updating-default-login-credentials/1178 "2021-03-05T13:29:41Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![nthusi](https://communityhealthtoolkit.b-cdn.net/letter_avatar_proxy/v4/letter/n/e9c0ed/32.png) [@nthusi](https://forum.communityhealthtoolkit.org/u/nthusi)\
**Post date:** [March 5, 2021, 1:29pm UTC](https://forum.communityhealthtoolkit.org/t/updating-default-login-credentials/1178/1 "2021-03-05T13:29:41Z")

</div>

I’m having trouble updating the default admin role login credentials(medic/password).  
This is to avoid unintended admin logins by those familiar with the default CHT credentials

**Describe the Bug**  
After updating the user password while logged in using the default credentials, the update seems successful but subsequent logins using the new password fail.

**How To Reproduce The Issue**  
List steps for someone trying to reproduce the behavior. For example:

1. Log in using the default credentials (medic/password)
2. Go to the app menu and select User settings
3. Click on ‘Update password’
4. Set a new password

**Expected Behavior**  
I expect to log in using the newly set password on my next login

**Environment**

- Instance: self hosted installation
- Browser: Google Chrome
- Client platform: Linux - Ubuntu 18.04
- Docker version 20.10.3, docker-compose version 1.28.2
- App:webapp
- Version: 3.9.0

**Additional Context**  
I’d like advice on how to either change the default credentials password or disable the default account

---

<div class="post-metadata">

**Author:** ![gareth](https://communityhealthtoolkit.b-cdn.net/user_avatar/forum.communityhealthtoolkit.org/gareth/32/62_2.png) [@gareth](https://forum.communityhealthtoolkit.org/u/gareth)\
**Post date:** [March 7, 2021, 10:40pm UTC](https://forum.communityhealthtoolkit.org/t/updating-default-login-credentials/1178/2 "2021-03-07T22:40:19Z")

</div>

I’ve just reproduced this on my machine. The dialog reports success the HTTP request returns 200, and the API log reports success, but alas the change doesn’t stick! I’ve raised [an issue](https://github.com/medic/cht-core/issues/6986) to either fix this, or let the user know how to manually change the admin password.

I think the workaround is to change the admin password by following the [CouchDB documentation](https://docs.couchdb.org/en/2.3.1/config/auth.html#server-administrators) which may need root access to the instance.

---

<div class="post-metadata">

**Author:** ![gkesh](https://communityhealthtoolkit.b-cdn.net/user_avatar/forum.communityhealthtoolkit.org/gkesh/32/1313_2.png) [@gkesh](https://forum.communityhealthtoolkit.org/u/gkesh)\
**Post date:** [March 8, 2023, 7:33am UTC](https://forum.communityhealthtoolkit.org/t/updating-default-login-credentials/1178/3 "2023-03-08T07:33:12Z")

</div>

Hi @gareth, we have been going through the same issue in our CHT 4.1.0 instance and we are having trouble resetting the password through the means you mentioned. Could you please walk us through the process of changing the password?

The steps I have taken so far are:

1. Logged into the Server and accessed `cht_couchdb_1` container
2. Opened the file `/opt/couchdb/etc/local.ini`
3. Added the field `medic = password` under `[admins]`
4. Restarted the docker container using `docker restart cht_couchdb_1`

But it does not replace the plain-text password in the `local.ini` file with the hashed version as stated in the documentation and the password remains unchanged.

We are just looking to revert `medic` password back to original but it is not working at all.

cc: @sanjay @nitin @niraj
