Changing forgotten admin password in PMM

Description

PMM does not allow to easily configure email server so "forgot password" function does not work. 

 

The other potential way to do it would be  to use grafana cli

https://grafana.com/docs/administration/cli/

 

This however does not work out of the box.  It is not clear how to run it so it detects and updates correct file. 

 

We should either make it work out of the box or document proper process.

 

I made it work with 

grafana-cli --homepath "/usr/share/grafana" admin reset-admin-password admin

 

And creating symlink from default grafana.db file to  /srv/grafana/grafana.db   but I'm not sure if this is the best option

 

 

 

 

 

How to test

None

How to document

None

Smart Checklist

Activity

Roma Novikov February 15, 2022 at 8:55 AM

This will be solved in 

planned for  2.27 release 

Fernando Laudares Carmagos March 22, 2021 at 7:20 PM

I was having a look at this, as changing the admin password in PMM is a request we get to see from time to time.

When the user connects to the web interface with admin / admin and then changes the password also in the web interface, the SQLite /srv/grafana/grafana.db is updated.

The /usr/share/grafana/data directory, however, does not exist in a new setup: it will only be created if the user runs the grafana-cli command line utility. And if it does that, in an attempt to change the password or modify something else, it would break the procedure mentioned by Peter.

For these reasons, I support the suggestion of having the symbolic link that points /usr/share/grafana/data to /srv/grafana in place in the pmm-server container; I see no harm in doing so since /srv/grafana, for all practical purposes, stores the data we would usually find under /usr/share/grafana/data in a standard Grafana environment.

Duplicate

Details

Assignee

Reporter

Priority

Components

Smart Checklist

Created October 23, 2019 at 11:17 PM
Updated March 6, 2024 at 5:18 AM
Resolved February 15, 2022 at 8:56 AM