Authentication issue in V1.2.4 under Ubuntu 14.04.5 LTS

Hello!

I’m trying to get authentication running with influxDB but fail to do so. I created a user called ‘nmon’ with password ‘reports’ and granted this user all rights for the database ‘nmon_reports’:

create user nmon with password ‘reports’
grant all on nmon_reports to nmon

Afterwards I enabled http authentication in the influxdb.conf:

[…]
[http]

Determines whether HTTP endpoint is enabled.

enabled = true

The bind address used by the HTTP service.

bind-address = “:8086”

Determines whether HTTP authentication is enabled.

auth-enabled = false

auth-enabled = true
[…]

Now I try to connect to work with this DB as the nmon user and fail to do so. It works neither with providing a password:

root@vdr:~# influx -username nmon -password reports
Connected to http://localhost:8086 version 1.2.4
InfluxDB shell version: 1.2.4

use nmon_reports
WARN: error authorizing query: no user provided
Using database nmon_reports

Nor without providing a password when I would expect to be prompted for one:

root@vdr:~# influx -username nmon
Connected to http://localhost:8086 version 1.2.4
InfluxDB shell version: 1.2.4

use nmon_reports
WARN: error authorizing query: no user provided
Using database nmon_reports

…nor after authenticating with the auth command:

auth
username: nmon
password:
use nmon_reports
WARN: error authorizing query: no user provided
Using database nmon_reports

What puzzles me most ist the “no user provided” message, because I did provide a username…

I tried first with V 1.2.2 which had the same problem an my hope was that it got fixed with V1.2.4 but obviously it didn’t.

Thanks in advance for every hint!

regards,
Stephan

@bolste You need to setup an admin user first. Did you follow this guide?

Hi, I have the same problem.

I followed the guide you indicated, created two users with all privileges one been the admin.
sudo nano /etc/influxdb/influxdb.conf
removed comment on
auth-enabled = true

sudo reboot
From node-red I can still access influxdb even if I enter a user that do not exist in influxdb.

I am using Win10 + Hyperv (ubuntu). All latest.
Influxdb runs on the ubuntu virtual machine. Node-red as well.

Thanks
Paulo