3

I'm wondering if we can restrict the access and usage of Virtualbox only to specific users. I'm using Ubuntu 18.04. I've multiple accounts configured in my PC and I don't want the guest user to use(or see) the Virtualbox. I've tried the solution mentioned here. But it doesn't seems to be working for me. I can still find and use VirtualBox under the Show Applications, when logged in as a Guest User.

Any help is much appreciated.

harry
  • 131
  • 3

1 Answers1

2

Perhaps there is a way to do achieve what you want with AppArmor
Since i cant find an easy way to do it, id say that you can 'play' with files permissions.

  1. Create a group or simply use the built-in vboxusers
  2. Change ownership of virtualbox files and launcher(s)
  3. Change perms of virtualbox files
  4. Add you permitted user(s) to the group created in (1)

``

# 1 # Create a group
sudo addgroup vboxpermitted
# add current user to the new group
useradd -g vboxpermitted $USER

# 2 # Change ownership
sudo chown -R root:vboxpermitted /usr/lib/virtualbox/*
sudo chown root:voxpermitted /usr/share/applications/virtualbox.desktop

# 3 # Customize execute rights (not for all, but for group)
find /usr/lib/virtualbox/ -type f -exec sudo chmod a-x {} \;
chmod 640 /usr/share/applications/virtualbox.desktop

# 4 # Add permitted user(s) to new group
adduser -g vboxpermitted <username>
cmak.fr
  • 8,696