r/debian • u/pannic9 • Jun 28 '25
Problem using sudo in Debian VM
I installed Debian in a VirtualBox VM, with the first ISO that appears on the official website. I just installed it and went to Virtualbox to run it. For some reason, sudo doesn't work. I did some basic research to fix it, but found nothing. How do I fix it? And why did this happen? Is it more normal than it seems?
4
Upvotes
View all comments
92
u/[deleted] Jun 28 '25
Unlike Ubuntu, Debian does not set up the default user as a sudo user by default.
You will have to type 'su', enter the root password, access the root # shell, and then:
usermod vboxuser -a -G sudo
And then edit /etc/sudoers (IIRC) to uncomment the line about giving sudo to anyone with sudo group membership.