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?
Asked
Active
Viewed 1,120 times
2 Answers
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
sudo
is usually configured to ask for the invoking user's password, not root's - see for example Which user's password doessudo
asks for? – steeldriver Oct 15 '23 at 15:38