1

I have installed VirtualBox on an Ubuntu Server installation, and I have created a user on that server named ram.

I want to give access to VirtualBox and its programs and operations only to the root user and the user named ram.

What do I have to do to set this kind of restricted access for VirtualBox?

Thomas Ward
  • 74,764

1 Answers1

7

On Ubuntu, only superuser and members of vboxusers can use Vbox by default. You can add users to the vboxusers group with the following command:

sudo usermod -a -G vboxusers username

This will give that user permission to run VirtualBox machines.

vidarlo
  • 22,691
  • Nice was wondering how this can be done! – George Udosen Jan 21 '18 at 15:03
  • It's probably the permissions of /dev/vboxdrv that matters, as this gives access to the kernel modules. This file is group writable and probably owned by root.vboxusers or similar. – vidarlo Jan 21 '18 at 15:05
  • I tried sudo usermod -a -G vboxusers ram but its not working. From ubuntu root users i have installed ubuntu inside virtualbox but when i logout and login to ram user and try opening virtualbox ... it does not show ubunut that is being installed in virtualbox – BSAI Techno Sales Jan 21 '18 at 15:32
  • 1
    So you have a machine created and owned by root, which the user ram should have access to? In that case, this is a duplicate of https://askubuntu.com/questions/455389/how-to-share-a-virtualbox-virtual-machine-with-users-of-the-computer – vidarlo Jan 21 '18 at 15:34
  • The url which you send me did not work – BSAI Techno Sales Jan 23 '18 at 06:35
  • What didn't work? Did you get any error messages? What did you actually do? – vidarlo Jan 23 '18 at 10:36
  • I simply trigger sudo usermod -a -G vboxusers ram command . It does not show any error messages either. for verification i logout and login to normal user and tried virtualbox again but it did not opened. – BSAI Techno Sales Jan 25 '18 at 11:35