Suddenly unable to log into UI

Hi,

I have a TrueNAS 13.1-release-p9 installation that’s been going for years. I most recently logged into the web UI a couple of weeks ago, and since then I’ve had a handful of reboots (some accidental due to power loss). I’ve not updated the system or changed my password.

I’m suddenly unable to log in at all with the root account.

I get an error message “Username or password is incorrect”. I’m 100% sure the password is right – I use a password manager, I’ve tried it on multiple devices, I’ve let the password manager autofill, I’ve copied and pasted the password in myself, and I’ve manually typed it.

Moreover, I am able to log in via SSH (using a private key to an unprivileged user) and su to root with the password. I even tried changing the password using passwd.

Possibly relevant: the reason I was logging in, is that I’m getting a drive failure and I needed to start the process of replacing the drive (I’ve not yet ordered the replacement). The errors I get are:

* Device: /dev/ada1, Self-Test Log error count increased from 2 to 3.
* Device: /dev/ada1, 1 Currently unreadable (pending) sectors.

But the system is performing fine i.e. services running on it are fine and my cloud backups are running.

I’ve tried another reboot and anything else I can think of. What could be going wrong?

The drive issues will be irrelevant.

So you do get to the login screen?

Which TrueNAS release are you really using ??

I think your ask is really how to setup the password via ssh…

Hi,

So the point here is that it’s stopped working when I have changed nothing about my setup. I could log in a few days ago I’ve not done anything in the meantime.

Yes I get the login screen. The details are in the original post.

I also tried to change the root password over ssh and even then the new password won’t let me log in.

Martin

I’ve just stumbled on a solution, but I really can’t understand why it worked when the other things I tried didn’t.

I connected to the physical machine (using HP iLO in my case) rather than via SSH. This presents a menu where “change root password” is one of the options. I did this, changing it to the same password I had before. Login via UI now works.

Why this worked when using passwd as root in SSH did not I don’t understand.

I also have no explanation for why it happened in the first place.