Skip to main content
Skip table of contents

Update Password procedure for mongo, minio, redis, postgresql

Mongo

To change the password for Mongo, please follow these steps.

  1. login to the mongo-client pod by exec'ing into it ( you can get these instructions to run mongo client pod by running helm -n ef-external status mongo and follow along the instructions printed)

CODE
kubectl -n ef-external exec -it mongo-mongodb-client -- bash
  1. login to the mongo using existing password

CODE
mongosh admin --host "mongo-mongodb" --authenticationDatabase admin -u root -p <EXISTING_MONGO_ROOT_PASSWORD> --tls  --tlsAllowInvalidHostnames  --tlsAllowInvalidCertificates --tlsCertificateKeyFile /tongo/combined.pem  --tlsCAFile /tmp/mongo/client-pem
  1. once inside the mongo shell, assign the db variable to detailed information of admin db where all password related information is saved

CODE
db = db.getSiblingDB('admin')

then change the password

CODE
db.changeUserPassword("root", "NEWPASSWORD")
Sample Output
CODE
MongoDB shell version: 2.4.8
connecting to: 127.0.0.1:27017/admin
admin> db = db.getSiblingDB('admin')
admin
admin> db.changeUserPassword("root", "NEWPASSWORD")
> exit
  1. logout of the mongosh and try to reconnect with the new password

CODE
mongosh admin --host "mongo-mongodb" --authenticationDatabase admin -u root -p <NEW_MONGO_ROOT_PASSWORD> --tls  --tlsAllowInvalidHostnames  --tlsAllowInvalidCertificates --tlsCertificateKeyFile /tongo/combined.pem  --tlsCAFile /tmp/mongo/client-pem

PostgreSQL

to change the postgresql password, please follow these steps

  1. launch the postgresql client pod

    CODE
    kubectl run ef-postgresql-client  \
    --namespace ef-external \
    --image docker.io/bitnami/postgresql:16.2.0-debian-12-r6 \
    --env="PGPASSWORD=$POSTGRES_PASSWORD" \
    --command -- sleep infinity
  2. exec into the client pod

CODE
kubectl -n ef-external exec -it ef-postgresql-client -- /opt/bitnami/scripts/postgresql/entrypoint.sh /bin/bash

To change the postgres user's password

CODE
psql --host ef-postgresql -U postgres -W # when propmted for password enter postgres user's existing password
postgres=# alter user postgres with password 'NEW_PASSWORD';
postgresl=# \q

To change the sa user’s password

CODE
psql --host ef-postgresql -U postgres -W  # when propmted for password enter postgres user's existing password
postgres=# alter user sa with password 'NEW_PASSWORD';
postgresl=# \q

exit the client pod

CODE
exit

Redis

Redis server does not allow the password to be changed during runtime without restarting the pod because the password is always saved in the redis.conf file. To change the redis password, change the password in the helm chart’s values.yaml file and run the helm upgrade command used to deploy the helm chart.

minio

Minio requires the accesskey and secretkey parameters at the start, which are not changeable during the runtime. To change these parameters, update the helm chart with required change and restart the deployment using helm upgrade command used when depolying the solution

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.