How to create admin login and other login in influxdb

Hi ,

I have just installed Influxdb2 on linux … I have created login using UI .
but now i am trying to create admin login from command prompt ot is giving error …‘Unauthorized access.’

$ influx user create -n abcd-p xxxxx -o 000
Error: Unauthorized access.
See ‘influx user create -h’ for help


same here . any update or help here please.
in V1 I used to authenticate via CLI: influx -username ‘myuser’ -password 'xxx’
what is the process in V2 ?

solution: Create .influxdbv2/credentials and paste only the token that is created for your admin account / or has rights to create user (write). Works perfect


So, where do I find the admin token?

It is not working with the tokens I can create under Data -> Tokens.

Same thing here.
Error: Write:users is unauthorized.
CLI interface or python/java client give the same error.
How to create new user account?

I stumbled over this as well, you need to add -t and a valid token from an admin user then it works.

Me as a interested user and not a super nerd must say v2 sucks balls, documentation is not intuitive and I’m going to give it a break for a while.
I’m using v1.8 with and without SSL, with and without users and passwords and all that without any issues plus it was quick to implement. So good examples in the documentation.

1 Like
influx -t xxxx user create -n userName -p pass -o TS

Maybe this was obvious to others, but I struggled to find in the online documentation how to set the permissions of the newly created user. The influx auth create command ended up helping me achieve this. The help flag shows all the different permission flags and usage.

influx auth create -h