已知admin密码修改新密码
API 接口
curl -X PUT -H "Content-Type: application/json" -d '{ "oldPassword": "admin", "newPassword": "newpass", "confirmNew": "newpass"}' http://admin:admin@:3000/api/user/password
ui界面
直接进界面修改
忘记admin密码重置密码
命令行
grafana-cli admin reset-admin-password ...
If running the command returns this error:
Could not find config defaults, make sure homepath command line parameter is set or working directory is homepath
then there are two flags that can be used to set homepath and the config file path.
grafana-cli --homepath "/usr/share/grafana" admin reset