How can I change the admin's email on openBalena?

Hi community,

I’d like to change the admin’s email on my openBalena instance.
I tried to do so by

  1. stopping the services with ./scripts/compose down
  2. re-running the quickstart script with ./scripts/quickstart -U newemail@hello.ciao -P supersecret -d always.the.same.domain -c

and everything ran smoothly; however, when I try to login to the openBalena instance using the new email, it’s not working, although the old one is!
Do you have any suggestions on how I can solve this?

Cheers,
Saverio

Hello Saverio,

With this you should be able to change the superuser password.
Let us know if this worked out for you.

hey @taromurao , thanks for your answer! This works for changing the password; however, I would like to change the admin email (OPENBALENA_SUPERUSER_EMAIL). I tried to follow the same procedure but doesn’t let me logging in with the new email specified.

Hi Saverio, I misunderstood, sorry. I need to check up with my colleague and come back to you. Since we are running into another weekend, I probably would be able to come back to you first on Monday. Let’s see. Let us know if you have found a solution/workaround during the meanwhile.

1 Like

Hello Saverio,

Wish you had a good weekend.

My colleague who works on open balena said that currently the superuser email must be changed in the DB and that open-balena doesn’t support that atm, it’s a cloud feature only.

When you start up open balena, you should have the DB container with the name openbalena_db_1. When you connect to the PostgreSQL DB with docker exec -it openbalena_db_1 psql -U docker and switch to the resin database, that is \c resin, you see user table. There you need to modify the email. Note, if you simply type something like select * from user, you might get entries from the PostgreSQL’s built-in user table. Quoting like select * from "user"; would give you access to the user table in the resin database.

Let us know if it have worked for you.

1 Like

Another couple of words to add are: Since the superuser email address is not used anywhere else aside from login, it can be actually anything. You can use whatever email address as long as you keep it somewhere, like a password manager. You can also login with your username, if it fits you better.

1 Like

this worked perfectly! Thanks for taking the time to look into it :slight_smile:

Hello Saverio,
Glad to hear that it worked :slight_smile: