Username and password

I’ve been using the open source, local instance of Grafana for a couple months. I’ve never been asked to enter a username and password, just point browser to community.grafana.com and it comes up.

This morning it wants a username and password. I made no changes. admin admin doesn’t work.

Can’t find the .ini file to reset it, the grafana-cli reset password commands don’t work because of home path something.

What’s the deal here? How to fix?

  1. Please tell us which operating system and version you are running Grafana
    on.

  2. Please tell us which version of Grafana you are running.

  3. Please show us exactly what command you are typing (and which user you are
    running it as) for “the grafana-cli reset password commands”.

  4. Please tell us exactly what “something” means.

Thanks,

Antony.

mac OS latest, current Grafana 8.

$ grafana-cli --homepath “/usr/share/grafana” admin reset-admin-password admin
Grafana-server Init Failed: Could not find config defaults, make sure homepath command line parameter is set or working directory is homepath

What is home path? Where is home path? I have no idea where brew installed it. No idea why all of a sudden after months I have to enter a password.

/usr/local/etc/grafana

added that as home path…still errors. can’t find config file.

the grafana.ini file shows the password as admin but it fails.

Maybe I need to remove it completely…but it’s easier to build rockets for mars than to remove it. You have instructions or suggestions?

1 Like

deleted, uninstalled, reinstalled, restarted, etc.

It refuses to accept admin admin

This is so frustrating. Can anyone help with any of these?

  1. How to make it accept the user and password or reset
  2. How to fully remove it and I can reinstall
  3. Explain why magically after months it wants a user and password

“mac OS latest, current Grafana 8.”

Sorry, but now that I see you’re on a Mac, I’m unfamiliar with how things work
there.

I’m sure someone can help if you just give them time to respond.

Antony.

I don’t know what happened with my install but after trying a bunch of username and password combos it finally worked and I changed the username and password back to defaults.

Dumb problem, my fault I guess…but also…not sure why it never asked for the login for 90 days.

but it’s easier to build rockets for mars than to remove it. NO SHIT!

I had this problem too. I locked myself out of Homebrew’s Grafana installation; Safari didn’t save the very good auto-generated password, and numerous re-installs (including “remove --zap”) did not help.

At last I noticed there were files in /opt/homebrew/var:

[/opt/homebrew]$ find . -name "*grafana*"
./var/homebrew/locks/grafana.formula.lock
./var/lib/grafana
./var/lib/grafana/grafana.db
./var/log/grafana
./var/log/grafana/grafana.log
./var/log/grafana-stdout.log
./var/log/grafana-stderr.log

Removing those enabled me to make a real clean installation and start over.

What confuses me is that the running server process is this:

[/opt/homebrew]$ ps aux|grep grafana
[...] /opt/homebrew/opt/grafana/bin/grafana server 
--config /opt/homebrew/etc/grafana/grafana.ini 
--homepath /opt/homebrew/opt/grafana/share/grafana 
--packaging=brew cfg:default.paths.logs=/opt/homebrew/var/log/grafana cfg:default.paths.data=/opt/homebrew/var/lib/grafana cfg:default.paths.plugins=/opt/homebrew/var/lib/grafana/plugins

I don’t really understand how the homepath shown here relates to where the actual database is stored: /opt/homebrew/var/lib/grafana/grafana.db

If I attempt grafana cli admin reset-admin-password with that homepath, it creates a new database in the wrong place, that the actual server won’t see.