Lost admin password influx v2.0. Reset?

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.

1 Like

@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 :slightly_smiling_face:

1 Like

Perfect. Thank you @dan-moran.

I found influxd.bolt on the host and in the container at /var/lib/influxdb2/influxd.bolt

I was able to confirm that my username was not admin. But even then, that didn’t jog my memory.

Simple text search led me to my user token:

"description":"noerr's Token",

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:~ $ 

And this time I have save the password. :wink:

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”.

Please help!

1 Like

Hi @raymond4entrak. Have you tried the above solution given by @dan-moran.

Hi @sandersbud4,

Yes, I’ve tried but got the same error, 401 unauthorised access. Actually, all Influx commands has the same error.

Sorry guys, my fault. I got the token from a wrong influxd.bolt file. Thanks.