Can't factory reset Archer A7, credentials bad

SO I've been using OpenWRT on this Archer A7 for a few years now, no issues that some head scratching couldn't fix but this one's got me stumped. It started with trying to login to the router with no love, oddly it switched to https and the browser warned me about an unsafe connection - I disconnected the router from my modem and used a hard pipe, same https thing but i tried login anyways, bad user/pass. Huh. So I tried a factory reset using the hard button, no effect. Huh. So I tried to tftp the 21.02.1 factory bin using the model specific instructions and it bootlooped. Uh oh. Tried tftp the 21.02.0 image and it took and now I can access the GUI login screen as normal. But it still does not accept my credentials and does not indicate or accept the first-use defaults. Tried to reset with the hard button again, no effect. Tried to tftp the image a few more times in case it was a bad flash, they all took without incident but not change in behavior.

Does anyone have any ideas? I can think of no config change that occurred since the last login. The wifi is disabled as if the reset worked so it seems a partial reset occurred with the tftp'd firmware. Thanks for any ideas.

The reason you get the "warning" using https to log in to the router is that OpenWRT uses a self-signed certificate, which browsers don't like.

You can either accept and continue, or use http.

The warning can be disabled in /etc/config/uhttpd by setting option redirect_https to '0'.

default login username and password both are admin

Did you try going back in time to when you first got it?

That's for stock firmware.

The OP is talking about OpenWRT.

Funny things happen when you flash devices. If it's not fully wiping the chip and loading the OS then it's possible remnants are stuck in the image from OE flashing.

If OWRT default / personal un/pw don't work what's the problem with trying it?

Been using OpenWRT for years on an Archer C7, and have never seen "funny things" either flashing through the GUI, TFTP, or serial.

The issue has to do with the OpenWRT self-signed certificate.

To login into the device?

If the OP used the factory 21.02.0 image, the credentials were reset to the default.

root
no password

Thanks both of you, good info and questions. Yes, my old (normal) credentials don't work to log into the router and the root/blank combo doesn't work either. I took your suggestion to downgrade a bit more, tftp'd 19.07.8 and now the login screen tells me there is no password set on the router. I thought I was in, but attempting root/blank doesn't work - interestingly the "no password set" message persists.

NavyGuy, I'm able to access the web interface via http again since the downgrade to 21.02.0, that's what I'm sticking with for troubleshooting. The cert shouldn't be an issue in this case right?

You should still be able to access LuCI functions...even with the warning.

Can you navigate to System > Administration and set a password?

If your using 19.07.8, it's not enforced.

For 21.02, you would either use HTTP to access the router GUI, turn off the config setting in uhttpd (posted above), or just accept the cert warning and log in.

I know, it's so unusual. I can't get past the login screen. Since 19x at least gave me the "no password set" message at the login I'll try flashing 18x and report back. Who knows?

For some devices if you "console" to them you can set a PW with passwd / enter

Other option would be editing the auth file to add credentials

Use failsafe mode to reset the router to defaults. This will ensure that you have at truly default condition.

You should be able to get past the login screen simply by hitting login (you don't need to enter a password).

If it isn't working, clear your browser cache or use a different browser and/or incognito/private mode.

Alright, lowest FW that supports the ath79 chipset is 19.07.0, slapped that on there and now i get the "no password set" warning along with a button to goto password configuration. It does nothing, along with root/blank credentials. I'll try failsafe, appreciate y'alls help so far.

ok, tried new browser, no-go. failsafe'd in, tried passwd and firstboot commands, same symptom. Wew.

When I commanded firstboot it output "/dev/mtdblock5 is mounted as /overlay, only erasing files" - this reminds me I was configured for extroot before the initial discrep started. Would this impact the current troubleshoot?

It could.

SSH in to the router and run df -h

Post the results in preformatted text, by using the icon highlighted in red.

OpenWRT Posting Icons

root@OpenWrt:~# df -h
Filesystem                Size      Used Available Use% Mounted on
/dev/root                 2.8M      2.8M         0 100% /rom
tmpfs                    60.8M    292.0K     60.5M   0% /tmp
/dev/mtdblock5           10.4M    420.0K     10.0M   4% /overlay
overlayfs:/overlay       10.4M    420.0K     10.0M   4% /
tmpfs                   512.0K         0    512.0K   0% /dev

SSH in and run the following...

mount_root

umount /overlay && firstboot && reboot

Failing that...

mount_root

umount /overlay && jffs2reset && reboot

jffs2 will rewrite the whole flash area of the jffs2 partition, instead of reformatting it.

Smells like Linux but, not sure about these partitions but, makes sense to chain the commands together to be more efficient.

df -h seems to be on the smaller side and probably not showing hidden partitions / unformatted space as 82MB doesn't seem right as it should probably 128MB.or 256MB

No change in behaviors after trying either command, here's the current df-h output:

root@OpenWrt:~# df -h
Filesystem                Size      Used Available Use% Mounted on
/dev/root                 2.8M      2.8M         0 100% /rom
tmpfs                    60.8M    292.0K     60.5M   0% /tmp
tmpfs                    60.8M     60.0K     60.7M   0% /tmp/root
tmpfs                   512.0K         0    512.0K   0% /dev
/dev/mtdblock5           10.4M    424.0K     10.0M   4% /overlay
overlayfs:/overlay       10.4M    424.0K     10.0M   4% /