[Solved] Luci page shortcut

I want to place a shortcut on my desktop to open a specific Luci page (like http://192.168.1.1/cgi-bin/luci/admin/system/commands).
Problem (or logical) is that the authorization page is displayed first. After successful login the correct Luci page is shown.
Is there a way to incorporate the username and password in the shortcut to automate authorization and go directly to the page (like http://192.168.1.1/cgi-bin/luci/admin/system/commands -username -password)?

There used to be a way to login automatically with http://username:password @ 192.168.1.1/....
Haven't tried it though.

Pretty dangerous to put your password in a desktop shortcut, even if you’re not running Windows. Might not even have to be logged in to your desktop to read it, in clear text.

Maybe there’s a better way to accomplish your higher goals?

There used to be a way to login automatically with http://username:password @ 192.168.1.1/....
Haven't tried it though.

Tried it but doesn't work.

I see your point, but this PC is only accessible and used by me.

Yep, just use

https://<ROUTER-IP>/cgi-bin/luci/?luci_username=root&luci_password=<PASSWORD>

4 Likes

Works exactly as i wanted. Thanks

And how to screen special characters — ^&#:; ???

I surmise you cannot use any character that isn't part of a valid URL...the other options would be:

URL encoding

2 Likes

An alternative way might be to significantly extend the lifetime of the Luci cookie.

Or you could use your own cookie. (I could give you code)

EG
Put a cgi script at /www/cgi-bin/autologin that checks for your cookie.

  • if the cookie does not exist then a username and password challenge could be displayed and the response put into a cookie and then redirect to luci with the credentials.
  • if the cookie exists then then grab the username and password from it and redirect to luci.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.