Skip to content

Instantly share code, notes, and snippets.

@s-chb
Last active July 28, 2020 16:44
Show Gist options
  • Save s-chb/3148468b6f2bc4fd446348cfb39d9b2d to your computer and use it in GitHub Desktop.
Save s-chb/3148468b6f2bc4fd446348cfb39d9b2d to your computer and use it in GitHub Desktop.
Change Grafana default Username and Password :
1. Run : sudo nano /etc/grafana/grafana.ini
2. Change the following parameters :
#################################### Security #################################$
[security]
# default admin user, created on startup
admin_user = tap-your-username
# default admin password, can be changed before first start of grafana, or in $
admin_password = tap-your-password
When the grafana database is initialized, it uses the informations defined in grafana.ini. That's why you need to alter the database or delete it in order for your modifications to be taken into consideration
This is an example on how to update the grafana database with your new password hash
$ sudo sqlite3 /var/lib/grafana/grafana.db
sqlite> update user set password = '59acf18b94d7eb0694c61e60ce44c110c7a683ac6a8f09580d626f90f4a242000746579358d77dd9e570e83fa24faa88a8a6', salt = 'F3FAxVm33R' where login = 'admin';
sqlite> .exit
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment