How to call strg.cfg with Auth (username and password)?

Albert25
Beiträge: 2
Registriert: Freitag 7. Februar 2014, 21:12

How to call strg.cfg with Auth (username and password)?

Beitrag von Albert25 » Sonntag 16. Januar 2022, 15:46

We have several "NET-PwrCtrl HUT" switches, version "HUT 5.0".

I want to query their status from a script, but cannot get the authentication to work. (the switch uses the default "admin" user and "anel" password)

When I do

Code: Alles auswählen

curl "http://power-1.example.lan/strg.cfg?Auth:adminanel"
I get

Code: Alles auswählen

401 Unauthorized: Password required
The same command does work on another switch which doesn't require authentication.

How should the authentication be sent for HTTP queries?

Thanks