如何将用户添加到 vboxusers 以启用 USB 使用

Gin*_*797 26 virtualbox users groups

我想在目前在 Virtualbox 中运行的 Windows XP 中使用我的闪存驱动器,但是当我打开设置以启用 USB 使用时,出现错误:

Failed to access the USB subsystem.
VirtualBox is not currently allowed to access USB devices. 
You can change this by adding your user to the 'vboxusers' group. 
Please see the user manual for a more detailed explanation


Result Code: 
NS_ERROR_FAILURE (0x00004005)
Component: 
Host
Interface: 
IHost {30678943-32df-4830-b413-931b25ac86a0}
Callee: 
IMachine {22781af3-1c96-4126-9edf-67a020e0e858}
Run Code Online (Sandbox Code Playgroud)

有谁知道如何解决这一问题!?

kir*_*iri 53

在您的主机中,运行以下命令:

sudo usermod -a -G vboxusers $USER
Run Code Online (Sandbox Code Playgroud)

现在执行注销(在将当前用户添加到组后总是需要的)。

登录后,vboxusers使用此命令检查您是否在组中,确保vboxusers在显示的列表中:

groups $USER
Run Code Online (Sandbox Code Playgroud)

  • 我收到错误:usermod:组“vboxusers”不存在 (2认同)
  • ```adduser:组 `vboxusers' 不存在。``` 现在怎么办? (2认同)
  • 哦等等,这是您在主机操作系统中运行的东西,而不是来宾操作系统? (2认同)
  • 实际上,对于 Linux 来宾 + 主机(不完全是问题但很有帮助),您需要在 **host** 上同时执行 `sudo usermod -a -G vboxusers "$USER"` 和 `sudo usermod -a -G vboxsf安装扩展包后,**guest** 上的“$USER”`,然后**重新启动**guest。 (2认同)

小智 12

这对我有用,我的 VirtualBox 问题已解决

sudo usermod -a -G vboxsf "$USER"
Run Code Online (Sandbox Code Playgroud)

  • 我收到错误:`usermod:组'vboxsf'不存在` (2认同)

小智 8

  1. 使用 usermod 命令按照其他答案的建议添加用户。
  2. 运行命令id。您应该vboxusers在列表中看到。
  3. 如果您没有看到该信息,您可以重新启动计算机并重试id

当您因运行而列出 vboxusers 时id,您就可以将 USB 与虚拟盒一起使用了。


小智 7

  1. 在终端运行:

    sudo adduser $USER vboxusers
    
    Run Code Online (Sandbox Code Playgroud)
  2. 重新启动所有系统