I have forgotten or misplaced the administration username & password for InfluxDB 2 after being up and running for about a month.
I’m running InfluxDB v2.0 as a Docker container.
Is there any way to reset or change the password now?
If not, can I at least determine what the administrator username is? (this might help jog my memory of the password)
I’d rather not just scrap the whole container install and start again, because there’s a month of data acquired now in this container install.
The web GUI is up, but not helpful since I can’t login.
I did some poking around the container file structure using docker exec but I didn’t notice anything promising.
@Noerr if you have access to the influxdb.bolt file you can cat it and inspect its contents. Metadata values are stored as JSON within the DB so you should be able to find a text matching a pattern like users<text>{"name": "<your-name>"}. I’m also able to see the operator token created by influx setup when I do this, which I think should give you the power to overwrite your password using the CLI.
Relatedly, we’re currently working on an influxd inspect command to support regenerating the root user in situations like this. So the solution won’t always be so hacky
And then I was able to update my password with the CLI:
pi@raspberrypi:~ $ docker exec -it 85e4df16a429 influx user password -n noerr -t xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx==
? Please type your new password *********************
? Please type your new password again *********************
Your password has been successfully updated.
pi@raspberrypi:~ $
I’ve got a similar issue. I can find the token but when I execute the influx user, I got “Error: failed to find user “admin”: 401 Unauthorized: unauthorized access”.