influxdata / influxdb

Scalable datastore for metrics, events, and real-time analytics
https://influxdata.com
Apache License 2.0
28.66k stars 3.54k forks source link

How do I change the root password? #3080

Closed haf closed 9 years ago

haf commented 9 years ago

I'm trying to change root:root to something else, but your docs aren't making it easy:

https://influxdb.com/docs/v0.9/query_language/database_administration.html doesn't even mention the 'root' user. Googling 'influxdb configuration file' gives v0.8 admin docs with no links to 0.9, and not even 0.8 docs mention anything about the root user. Searching google groups yields "I've lost my root user password, how do I reset it?". No help from the command line (only -username, -password which don't help as I want to change it, not use it). Trying curl instead:

$ curl -G 'http://localhost:8086/query?pretty=true' --data-urlencode "q=SHOW USERS"
{
    "results": [
        {
            "series": [
                {
                    "columns": [
                        "user",
                        "admin"
                    ]
                }
            ]
        }
    ]
}

But that's not the root user. What admin vs root means, I don't know. According to docs there are "three types of users" but then I should see root, also, right? And I don't.

Nor is it accessibly though the GUI. There's a 'root' user but it cannot be clicked.

Ehm... Hard enough to use to warrant an issue imo. Onboarding ("NOW GET STARTED!") in test/dev is fine, but some people just want a fairly safe-by-default setup, setup quickly in prod.

beckettsean commented 9 years ago

If you are using the admin UI, the root:root user is a display artifact and does not actually exist in the database. You can put any values in those fields and the connection will still work.

The reason it still works is that authentication is off by default at installation. You must explicitly enable it in the configuration file and relaunch the daemon to turn it on. Docs are here: https://influxdb.com/docs/v0.9/concepts/authentication_and_authorization.html

Issues #2193 and #2278 should also give you good context on the current state of authentication and installation.