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


#1

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?


Admin password
Cant login to metabase as admin
#2

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


#3

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


#4

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


#5

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


#6

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.


#7

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: