I think I've got a dead system now, but I don't know how to recover.
I was updating from Buster to Bookworm with the standard method outlined here - https://wiki.debian.org/DebianUpgrade
After starting the upgrade, I had the error /usr/bin/perl: error while loading shared libraries: libcrypt.so.1: cannot open shared object file: No such file or directory and the upgrade stopped. Quickly searched for the solution and found this answer to resolve it, so started to execute that.
When trying to run sudo cp -av lib/x86_64-linux-gnu/* /lib/x86_64-linux-gnu/, I had a strange sudo error, something along the lines of cannot escalate, is your account locked? I don't know the exact error. I assumed a quick reboot would solve it, but this is where the problem started.
Once the computer was booted, I attempted to SSH into it and kept getting connection refused. I run this headless most of the time, so this was obviously a bad sign. I took it down from where it normally is and plugged it into a monitor to figure out what was going on.
The machine booted fine, but at the login prompt whenever I typed my username I'd get an immediate Login incorrect before even being prompted for the password. I tried root and also got Login incorrect.
I attempted to boot into debian recovery, and was met with the same error. No matter what I do, I can't log in to the system.
Here is a screenshot of the log before the login prompt.
I've attempted to boot into rescue mode from a usb drive, and I've been able to get a prompt on the system. Trying journalctl just gives me "No journal files were found."
The only thing I can find that might be of note is in /var/log/auth.log, which is;
PAM unable to dlopen(pam_unix.so): /lib/security/pam_unix.so: cannot open shared object file: No such file or directory
PAM adding faulty module: pam_unix.so
FAILED LOGIN (1) on `/dev/tty1` for `root`, Authentication Failure
Does anyone know how I can recover the system from this point? I've got absolutely no idea what to do. All I can access is the USB rescue mode prompt, so the actions I have are relatively limited.
Thanks
