Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FS#4012 - Can't login to LUCI but can SSH #9004

Open
openwrt-bot opened this issue Sep 6, 2021 · 6 comments
Open

FS#4012 - Can't login to LUCI but can SSH #9004

openwrt-bot opened this issue Sep 6, 2021 · 6 comments
Labels
flyspray release/21.02 pull request/issue targeted (also) for OpenWrt 21.02 release

Comments

@openwrt-bot
Copy link

jediwade:

Linksys WRT3200ACM
OpenWRT 21.02.0 Stable

Steps to reproduce:

  • Install OpenWRT 21.02.0 Stable as a fresh install.
  • Visit 192.168.1.1 and sign into Luci (with no password since it is a fresh install), go to System -> Administration and assign a password
  • Close the browser window
  • Login through SSH and enable HTTPS-redirect for Luci (as mentioned in the release notes: https://openwrt.org/releases/21.02/notes-21.02.0)
  • Open a new browser window in Incognito-mode
  • Visit 192.168.1.1 (should be redirected to HTTPS and may get browser warning about being unsafe)
  • Try to sign into Luci (should get message that the user/password is incorrect)

I have tried clearing my browser cookies, tried disabling the HTTPS redirect, restarted the router manually (power switch on device), tried using the "passwd" command to reset the password (and then restarted the router manually).

No matter what, I cannot login into the router ever again after enabling HTTPS redirect for Luci (even if the redirect is turned off and router restarted). I can, strangely, log into the router through SSH with the password I set for root.

I had to login through SSH and run the (cant remember exact) command to reset the router as if I just installed OpenWRT in order to gain access again.

@openwrt-bot
Copy link
Author

arek:

I have the same/similar problem - 21.02 stable, Netgear R6220. Also

mount_root
passwd
reboot

doesn't fix it. The weird thing is that

"Thu Sep 16 20:24:05 2021 daemon.err uhttpd[1786]: luci: accepted login on / for root from 192.168.x.x"

is logged so hm, some session management problem maybe.

No cookies are being set.

Oh. I was trying to log in via http:// ! There was no redirection to https://.

All above was with http://.

When I used https:// I logged in just fine.

@aparcar aparcar added the release/21.02 pull request/issue targeted (also) for OpenWrt 21.02 release label Feb 22, 2022
@gut5
Copy link

gut5 commented Mar 1, 2022

Same thing happens on openwrt 21.02.2

@0xStuart
Copy link

Having this issue on 21.02.3
I tried

/etc/init.d/uhttpd stop
rm -fr /tmp/luci-*
/etc/init.d/uhttpd start

Made no difference.

@jow-
Copy link
Contributor

jow- commented Jun 14, 2022

It's a client side problem. Often browsers refuse to accept the sysauth cookie sent by LuCI during login, usually because a cookie with the same name already exists, set in another security context.

@BillyCroan
Copy link

It's not a client side problem for me. I tried 4 different browsers on two different systems, and two of those also in private browsing/incog mode. Same result. pasting the pw into a terminal to log in via ssh works, but pasting it into luci does not. luci responds Invalid username and/or password! Please try again.
I tried opkg remove and install luci, to no avail. 21.02.3

@ivanlan9
Copy link

ivanlan9 commented Aug 6, 2022

I get it too, but luci doesn't even respond with invalid name or password: it simply redraws the page. A serious PITA.

However, that's if I go to http://192.168.1.1/ ; if I use https, then I'm able to login. I didn't enable the https redirect; maybe I should. My experience mirrors openwrt_bot's above. And yes, I tried three different browsers (I should get a medal for using Edge!).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
flyspray release/21.02 pull request/issue targeted (also) for OpenWrt 21.02 release
Projects
None yet
Development

No branches or pull requests

7 participants