Permission denied on LuCI and SSH after setting root password

I tried myself to change the password with passwd logged in with SSH.
The new password worked immediately both in new SSH and Luci.
What is the output of the following?

ubus call system board

Sadly, as I said, I had tried bank password, wrong password, strong password, weak password. They all fail with same msg, on SSH and LuCI. I also tried changing password with passwd and on LuCI.

I use a custom image, so it's easy to boot the PC and patch it back. It comes with current or very recent configs and I just use rsync to bring updated ones.

I don't have issue restoring access to it, the issue is I'm leaving it with no password.

yep it never happened before. I'm leaving for work, when I get back home I'll try it.

Pure guess, but are you sure that you are using vanilla passwd from busybox? (So that you are not using shadow-utils passwd or similar?)

There has earlier been trouble with more exotic/modern password hash algorithms, so I just want to make sure that you are using the defaults.

Does you password line in /etc/shadow start normally with $1$ ?

root@router1:~# cat /etc/passwd
root:x:0:0:root:/root:/bin/ash

root@router1:~# cat /etc/shadow
root:$1$oGk.../:18699:0:99999:7:::

see e.g.

Ps. musl C library password hash options were changed a few days ago in master, so I wonder if your problems might be a fallout from that.

1 Like

Maybe it's this?
https://bugs.openwrt.org/index.php?do=details&task_id=4044