VirtualBox GUI will not start for non-root user
I am completely new to VirtualBox and have built VirtualBox 2.0.6 from a SlackBuild script on a clean Slackware 12.1 install. I built and installed acpica, dev86, virtualbox-ose (with addons ISO) and virtualbox-kernel.
No compile errors. I created the vboxusers group and added my user to it and logged out/in - group shows in output of groups command. I made rc.vboxdrv and rc.vboxnet executable and started them both. When I attemtpt to start the GUI as normal user with /usr/bin/VirtualBox3 I get: Callee RC: NS_ERROR_FACTORY_NOT_REGISTERED And it fails to run. If I do the same as root user it starts OK. I have re-re-read the VB documentation and Slackbuild notes but feel I must be missing something simple - path or permission maybe? Any VirtualBox gurus with the quick answer? Thanks in advance. |
Try deleting /tmp/.vbox-*.
|
Check the permissions of /dev/vboxdrv. Chances are that it's root/root. A suggested way is to have the group id be vboxusers, and add vboxusers to the group list of anyone you want to give access to VirtualBox.
Added: Sorry, it's late. :) I see that you've added vboxusers, but did you set the group id for /dev/vboxdrv to that? |
Problem solved...
The startup error message...
Callee RC: NS_ERROR_FACTORY_NOT_REGISTERED (0x80040154) ...did not return any significant info on google, and I initially dismissed the error that appeared in the startup terminal window as a side-effect of the the other... Wrong owner (0) of '/tmp/.vbox-slacker-ipc'. ...mostly because... ls -al /tmp ...did not show any such file or directory, and ...and all other permissions including /drv/vboxdrv appeared to be correct according to the docs. But it was operator error I suppose because after coming back to it after a break I found... drwx------ 2 root root 4096 2008-11-30 17:26 /tmp/.vbox-slacker-ipc/ I simply removed this as root (OK according to TFM), then tried again - all works! So, for others having trouble starting VirtualBox 2.0.6 - look for... /tmp/.vbox-<username>-ipc/ owned by root - delete it and try again! [EDIT]Thanks Quiss42 - we must have been typing at the same time! As I posted here, that was the problem![/EDIT] |
So, you enabled hardening by default.
But the SlackBuild of vbox-ose from SBo should have set suid. try: chmod 4511 <path-to-`VirtualBox'-in-vbox-lib-dir> |
Quote:
I have not found any explanation of why my 'executable' is VirtualBox3 instead of VirtualBox - is that related to hardening also? Oh well, I am learning... In any event - I am happily virtualizing now! Thanks! |
Quote:
Honestly, although I understand the vboxusers-configuration (and think it's a good idea), I still don't get what the benefit in security should be by forcing the VirtualBox binaries to run as root. But upstream requested it as default, so.... Quote:
Hope this clears things up a bit :) |
Quote:
|
Hi ppr:kut!
I am trying to compile VirtualBox with your SlackBuild using this syntax: Code:
HARDENING=no VBOXUSERS=yes ./virtualbox-ose.SlackBuild For now, I just hacked it off with: Code:
chmod -s /usr/lib/virtualbox/ |
Actually you don't need to explicitly define VBOXUSERS, as it's set to "yes" by default.
Quote:
|
Let me add one more thing.
When I try to run a VM that I previously created with Vbox 1.6.x I get this message: Quote:
VBox runs fine as root. I think hack didn't actually work :P |
Alright, after taking a closer look at the script again, and also on your two posts I think you missunderstood some things. I try to explain the options again in detail:
Code:
HARDENING=yes VBOXUSERS=yes - binaries installed suid root: yes - user must be part of group vboxusers: yes - VirtualBox runnable for users not in vboxusers: no Code:
HARDENING=no VBOXUSERS=yes - user must be part of group vboxusers: yes - VirtualBox runnable for users not in vboxusers: no Code:
HARDENING=no VBOXUSERS=no - user must be part of group vboxusers: no - VirtualBox runnable for users not in vboxusers: yes As you now probably know, you seem to have configured virtualbox in another way then what you expected it to be. Your errors are all caused by the fact, that your user is not part of the vboxusers group. As you told the script to use the vboxusers group by passing "VBOXUSERS=yes" to the script, that would be the expected behavior and there is nothing wrong. |
You are right! I compiled again with:
Code:
HARDENING=NO ./virtualbox-ose.SlackBuild Code:
VirtualBox kernel driver is not accessible, permission problem. If you have built VirtualBox yourself, make sure that you do not have the vboxdrv kernel module from a different build or installation loaded. Also, make sure the vboxdrv udev rule gives you the permission you need to access the device.. I do not get this message as root, and I can boot my VMs just fine as root. I am sure I executed /etc/rc.d/rc.vboxdrv and rc.vboxnet. Is it an issue of permitions on /dev/vboxdrv? Here is my permitions: Code:
crw-rw---- 1 root vboxusers 10, 60 2008-12-04 15:54 /dev/vboxdrv |
you are in vboxusers group?
|
Quote:
Code:
vboxusers:x:215:jsmith Code:
HARDENING=no VBOXUSERS=no ./virtualbox-ose.SlackBuild |
All times are GMT -5. The time now is 02:04 AM. |