Issue with Creating New User - Influx 2.3

Hi

I am having to undertake the following to create a new user with a password in v.2.3, as the guide within Create a user in InfluxDB | InfluxDB OSS 2.3 Documentation does not work for me:

influx user create \
-n user \
-p “password123” \
--org “orginisation” \
--org-id <org-id> \
-t <admin_secret_token>

Please note that both the Password and the org have to be inside quotes.

Note: If I dont put password inside quotes it throws Error password too short (it matters not the length of pwd that is assigned at this point whether in or out of quotes) and likewise with the org it does not recognise the orginisation

Then once I have done this I need to then change the password for the user doing the following:

influx user password -n user -t <admin_secret_token>

This is due to when at the first step I am having to put the password inside quotes for the system to take the new user and apply a password to the user but the system not recognising the password due to it being in quotes at initial creation.

Hello @oneofthemany,
Hello I didn’t have any issue with creating a user as per the documentation:

anais@Anaiss-MacBook-Pro ~ % influx user create -n johndoe1 -p password123 -o org

ID			Name
09d4b1f40cdf7000	johndoe1

I didn’t have to put the password in quotes.
What version of the CLI and InfluxDB are you using?

@Anaisdg We are using podman containers, so not sure if that’s creating the issue or not

I’ll dump the output from the console of the container to show the exact steps and errors we are seeing and perhaps someone can replicate the error

I’ll also provide the container build script.

@oneofthemany Some things to note:

  • org and org-id are mutually exclusive. The soon-to-be-release 2.4 CLI will throw an error if you try to pass both. I’m not sure what exactly the command does in 2.3 if you pass both.
  • The command you shared uses curly quotes. It should use straight quotes (could just be copy-paste-format error)
  • You have to use the operator token (the token created for you when you set up the InfluxDB instance). You may be already, just wanted to make sure.
influx user create \
  -n user \
  -p "password123" \
  --org "organization" \
  -t <operator_token>
1 Like

@scott

You are correct in your thinking that is a copy paste format error as Mac notes always used curly quotes.

So to be clear you are saying that the org and password require straight quotes

If so that’s not in the guide from my recollection

Additionally even with straight quotes the password is not accepted and I have to change the password manually.

I’ll go through the steps and include this am tomorrow

:slightly_smiling_face:

@oneofthemany You shouldn’t need the quotes, but it really depends on the shell you’re using and how it parses string arguments.

Does the CLI return an error?

@scott Would that not apply to all of the arguments?

I’m back at work tomorrow, so I’ll pass over what I’m getting then in more detail

@scott

# influxd version
InfluxDB v2.3.0+SNAPSHOT.090f681737 (git: 090f681737) build_date: 2022-06-16T19:33:50Z

I have a way to do it without quotes and you have to proceed the token line with a chevron for each line:

influx user create \
  -n user \
  -p password123! \
  -o org_name \
  -t admin_token==> > > > 
ID                      Name
0000000000000012        user

Ok, this command worked. You don’t have to do a multiline command. The docs just show multiline for readability. I’m not sure why the chevrons are needed. What shell are you using? Is it just straight bash?

@scott - shell within podman container

if I remove the chevrons I get the errors and have to follow the aforementioned process