Mender client command line connect using credentials

Hi,

We are trying to connect to our hosted Mender server using command line on device.

We are able to connect using tenant token with command:

mender setup --config /data/mender/mender.conf --server-cert= --device-type ourdevice --server-url ``https://hosted.mender.io`` --hosted-mender --retry-poll 300 --update-poll 1800 --inventory-poll 300 --tenant-token XXXX

but trying to use credentials does not work:

mender setup --config /data/mender/mender.conf --server-cert= --device-type ourdevice --server-url ``https://hosted.mender.io``--hosted-mender --retry-poll 300 --update-poll 1800 --inventory-poll 300 --username username --password password

There is no change in configuration file for credentials or token after the command, only URL and polls changes. I was hoping it would automatically acquire tenant token using selected credentials and store it, as if you input it manually, when running interactive setup. There is no error output from command.

User is created on hosted Mender correctly. We were hoping to use credentials, so we can easily revoke them anytime.

Is there any way to get it work?

Thanks for help,

Michal

Hi @Michal,

Thanks for reaching out. Both approaches should work, under one condition: the user is not authenticated via SSO (Google, etc.), but was created on Hosted Mender with username and password. If SSO was used, Hosted Mender can’t check the password, hence the process does not work.

Additionally, this seems to be Mender Client 3.x, which is EOL by now. You should consider upgrading.

Greetz,
Josef