Page 1 of 1

Linux shell wget problem

Posted: 30 Nov 2016 00:34
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.

Re: Linux shell wget problem

Posted: 30 Nov 2016 14:37
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.