0

I'm sitting on a Virtual Machine on Debian 12, the password for root is simple, it's the letter q, but when I write, say, sudo -i and enter the password, the terminal only displays Sorry, try again. The thing is that when I go into Rescue Mode and enter the password for the root user, everything works out. What should I do?

2 Answers2

3

If you know the root password, then the appropriate command to become root is

su

or, if you want a login shell,

su -

This will ask you for the root password. sudo expects the user’s password, and has to be configured appropriately; in many cases it isn’t set up by default on Debian systems (especially when a root password is defined).

Stephen Kitt
  • 434,908
-2

have you tried running journalctl --system -b should hopefully help you identify what is going on. sudo -i should prompt you for user pass while sudo -s should prompt you for root password