I've set up two VMs with exactly the same image (debian-11.3.0-amd64-netinst - headless).
The only things I touched on these machines are:
- Root password
- Sysad password
- Installed sudo command
- Changed IP addresses
- Changed SSH Ports
- Installed UFW, changed SSH Port and activated OpenSSH & WWW Full
On the machine I created first, everything works properly: I can SSH into it with the
sysad user and then use
su root followed by root password to gain root access (ssh root login disabled by default).
On the machine I created second (with the exact same image), I can SSH into it with the
sysad user but
su root throws me an "Authentication failure".
journalctl tells me basically the same thing:
pam_unix(su:auth): authentication failure...
I checked groups and uids for both systems and the configurations are exactly the same. Also, I am 100% sure of the password. Su + root password works when doing it on the machine directly (via the hypervisor). I also entered the password multiple times by hand, even tried to check for a false char-set by typing the password in the username field to see it in clear text.
Does anyone have an idea about what I am missing here?