How do you reset a user's password without an email service configured or admin access?

I’m the admin of a small team running Metabase v0.17.1 on AWS Elastic Beanstalk (Docker 1.9.1). We do not have an email service configured. Yesterday, I wasn’t able to log in so I tried resetting my password which looked like it worked, but I never received any sort of email which is completely understandable since I don’t have an email service configured.

Is it possible to reset a admin’s password without an email service configured? Is it possible to regain access if a admins can’t log in?

1 Like

This gets a little tricky.

What you can try to do is pull the RDS connection string for the Metabase application db, connect directly and insert email creds into the settings db. It’s a little hokey but we currently don’t have another way to reset admin passwords.

You’d want to insert credentials in the following form:

email-smtp-host : hostname
email-smtp-username : username
email-smtp-password : password
email-smtp-port : port you should use to connect
email-smtp-security : ssl | tls | don’t insert
email-from-address : a white listed email sender on your service

1 Like

Oops. I had a realization that if you’re connecting to the application database anyway, you can probably just fish the reset token straight out of there. It’s in the user’s table as reset_token

Then go to https://YOURHOSTNAME/auth/reset_password/YOURTOKEN

2 Likes

Thanks @sameer! These are exactly the types of workarounds I hoped existed

Let me know if it works or if we can be of any help.

Hello guys,

where is the file you commented previously? I can see ‘metabase.db.mv.db’ and ‘metabase.db.trace.db’, and I don’t know what, where and how to modify it.

And the token where it is? because I try to find it following these steps, and ‘setup_token’ gives me null:

Thanks for the help.

I've tried to follow this steps, but I don't have any idea how to import or access to the database.

Any help would be grateful. Thanks again :smiley:

For future parties, the plaintext YOURTOKEN can be found in the metabase logs. I was struggling to find it in the database, since the reset_token in the core_user is encrypted.

1 Like

well i was working with an idiot whom didn't understand how reset password works and i needed the link myself to reset it for her.. @igaskin comment helped me out