Linux shell wget problem

Discussions about Z-Way software and Z-Wave technology in general
Post Reply
Sharppis
Posts: 3
Joined: 23 Nov 2015 12:51

Linux shell wget problem

Post by Sharppis »

Hi,

I have two razberries, both on rasp3 and same version. With both I can get sensordata through api in http query in browser. With other one I have cron running .sh file which contains couple wgets and it does some magic based on results. It works fine. But with other razberry I can't get same code workin in shell. Yes I have changed IP's :) If I run just bare wget in cmd line it says unauthorized. It connects to razberrys IP, but then stops. With working one I haven't send username or password. It runs freely against API.

Any suggestion how to get it working? Wget --username user --password password http://ip + port + command doesn't work.

Is there some setting which I should change? Both rasps are located in closed lan network so it's okay if it's open.
Provo
Posts: 112
Joined: 19 Oct 2016 19:54

Re: Linux shell wget problem

Post by Provo »

Try passing your username and password like this:

Code: Select all

wget http://username:password@yourip:8083/…
That is the standard way of passing credentials for basic authentication.
Post Reply