# Lost admin password influx v2.0. Reset?

**URL:** <https://community.influxdata.com/t/lost-admin-password-influx-v2-0-reset/21937>\
**Category:** InfluxDB 2\
**Tags:** influxdb\
**Created:** [October 4, 2021, 4:07am UTC](https://community.influxdata.com/t/lost-admin-password-influx-v2-0-reset/21937 "2021-10-04T04:07:12Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Noerr](https://sea1.discourse-cdn.com/flex023/user_avatar/community.influxdata.com/noerr/32/8460_2.png) [@Noerr](https://community.influxdata.com/u/Noerr)\
**Post date:** [October 4, 2021, 4:07am UTC](https://community.influxdata.com/t/lost-admin-password-influx-v2-0-reset/21937/1 "2021-10-04T04:07:12Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![dan-moran](https://sea1.discourse-cdn.com/flex023/user_avatar/community.influxdata.com/dan-moran/32/5885_2.png) [@dan-moran](https://community.influxdata.com/u/dan-moran)\
**Post date:** [October 4, 2021, 4:31pm UTC](https://community.influxdata.com/t/lost-admin-password-influx-v2-0-reset/21937/2 "2021-10-04T16:31:57Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![dan-moran](https://sea1.discourse-cdn.com/flex023/user_avatar/community.influxdata.com/dan-moran/32/5885_2.png) [@dan-moran](https://community.influxdata.com/u/dan-moran)\
**Post date:** [October 4, 2021, 4:32pm UTC](https://community.influxdata.com/t/lost-admin-password-influx-v2-0-reset/21937/3 "2021-10-04T16:32:44Z")

</div>

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 🙂

---

<div class="post-metadata">

**Author:** ![Noerr](https://sea1.discourse-cdn.com/flex023/user_avatar/community.influxdata.com/noerr/32/8460_2.png) [@Noerr](https://community.influxdata.com/u/Noerr)\
**Post date:** [October 4, 2021, 6:06pm UTC](https://community.influxdata.com/t/lost-admin-password-influx-v2-0-reset/21937/4 "2021-10-04T18:06:27Z")

</div>

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:

```auto
{"id":"1234567898000000",
"token":"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx==",
"status":"active",
"description":"noerr's Token",

```

And then I was able to update my password with the CLI:

```auto
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. 😉

---

<div class="post-metadata">

**Author:** ![raymond4entrak](https://sea1.discourse-cdn.com/flex023/user_avatar/community.influxdata.com/raymond4entrak/32/10284_2.png) [@raymond4entrak](https://community.influxdata.com/u/raymond4entrak)\
**Post date:** [June 2, 2022, 6:31am UTC](https://community.influxdata.com/t/lost-admin-password-influx-v2-0-reset/21937/5 "2022-06-02T06:31:32Z")

</div>

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!

---

<div class="post-metadata">

**Author:** ![sandersbud4](https://sea1.discourse-cdn.com/flex023/user_avatar/community.influxdata.com/sandersbud4/32/7200_2.png) [@sandersbud4](https://community.influxdata.com/u/sandersbud4)\
**Post date:** [June 2, 2022, 12:42pm UTC](https://community.influxdata.com/t/lost-admin-password-influx-v2-0-reset/21937/6 "2022-06-02T12:42:02Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![raymond4entrak](https://sea1.discourse-cdn.com/flex023/user_avatar/community.influxdata.com/raymond4entrak/32/10284_2.png) [@raymond4entrak](https://community.influxdata.com/u/raymond4entrak)\
**Post date:** [June 2, 2022, 2:11pm UTC](https://community.influxdata.com/t/lost-admin-password-influx-v2-0-reset/21937/7 "2022-06-02T14:11:31Z")

</div>

Hi @sandersbud4,

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

---

<div class="post-metadata">

**Author:** ![raymond4entrak](https://sea1.discourse-cdn.com/flex023/user_avatar/community.influxdata.com/raymond4entrak/32/10284_2.png) [@raymond4entrak](https://community.influxdata.com/u/raymond4entrak)\
**Post date:** [June 6, 2022, 6:41am UTC](https://community.influxdata.com/t/lost-admin-password-influx-v2-0-reset/21937/8 "2022-06-06T06:41:02Z")

</div>

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