2

I am running VirtualBox on a Windows Machine, and installed Ubuntu Linux 22.04 LTS. During the install, I set up the initial user. However, there appears to be no way to make this user have admin (sudo) privileges. After the install, I can login as the user, but I can't do anything involving admin (meaning, I can't use sudo). If there is a root password, I don't know what it is. (I think by default there is no password for root.)

I tried doing the trick where you run in recovery mode to run as root...but even then it prompts me for a root password, so I can't do anything.

I did the entire install process a second time, thinking I missed something, but to no avail.

Any advice on how to determine what the root password is when you install using VirtualBox? Or how to create a user that ends up in sudoers?

  • 1
    If you install using VirtualBox, there is no root password, you use `sudo` for everything. It *sounds* like you have an unofficial Ubuntu build that does something unusual and therefore is *not* governed by the same rules of Ubuntu 22.04. Where did you get the Ubuntu 22.04 installer/ISO? – Thomas Ward Feb 06 '23 at 19:45
  • I had the same issue and I downloaded the latest ISO from the ubuntu website. This is definitely an issue with the combination of ubuntu / VirtualBox and only seems to happen with the unattended installation option – Richard C May 12 '23 at 11:40
  • This may be a duplicate of https://askubuntu.com/questions/1440032/virtualbox-ubuntu-22-04-how-to-add-sudo-rights . – David Cary May 24 '23 at 02:51
  • related: [How can I make my own account a sudoers on VirtualBox?](https://superuser.com/questions/1623376/how-can-i-make-my-own-account-a-sudoers-on-virtualbox) – David Cary May 24 '23 at 02:52

1 Answers1

1

So, I found a colleague who suggested I try to login using "su root" and then enter the password for the first user created (which was NOT root). Sure enough, it worked!

This appears to be a bug? The default root user shouldn't have been created with a password, and the first user I created (which wasn't named "root") should have been given the option to be given admin access.

I'm not sure if this is an Ubuntu install issue, or a VirtualBox 7 issue.