User admin doesn't exist

Hi everyone

I lost super admin access, in another forum they recommended me to use the following command:

grafana-cli admin reset-admin-password admin

Throw the following error:

root@cnsmonitoreo:/home/administrador# grafana-cli admin reset-admin-password admin
INFO[01-11|10:33:19] Connecting to DB logger=sqlstore dbtype=sqlite3
INFO[01-11|10:33:19] Starting DB migrations logger=migrator
Error: ✗ could not read user from database. Error: user not found

Can anybody help me please, sorry for my bad English

Hi,

I would suggest trying with API :

curl -X PUT -H "Content-Type: application/json" -d '{ "oldPassword": "admin", "newPassword": "newpass", "confirmNew": "newpass" }' http://admin:admin@localhost:3000/api/user/password

Also check this thread :

https://localhost:3000/t/grafana-sqlite3-database-admin-passwd-change/234/10

Good Luck

Thank you wlargou, I am beginner in this, How I can use API in Grafana?

Hi,

Did you try the command i shared (replace localhost accordingly).

Good Luck

I try this, but not work for me

CLI send me:
“message”:“invalid username or password”}

I would rather uninstall grafana

Yes if it’s new env :slight_smile:

So, I Can see the BD tables users of Grafana?

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.