OPERATING SYSTEMSOS Linux

How to add Ubuntu user to sudoer (root access group) on VirtualBox VM

————————

1. Enter Advanced Boot Menu by pressing ESC during boot.
2. Select ‘Ubuntu Recovery Mode’
3. After all recovery mode initiations, select the option that lets you enter root shell.
4. This should be your Ubuntu password you set during VirtualBox VM setup. (Standard setup process).
5. You will see root mode enabled, now add your userName to sudo access group using following command: addUser username sudo
6. After successfully running, exit shell and go for normal boot.

If you are a sudoer following command shoot work fine without any error message: “sudo su” OR “sudo whoami”

source

ubuntu