Linux add user to group virtualbox

Как добавить пользователей в vboxusers

Поэтому я хочу использовать мой флэш-накопитель в Windows XP, который в настоящее время запущен в Virtualbox, но когда я открываю настройки, чтобы разрешить использование 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 Callee: IMachine

Кто-нибудь знаете, как это исправить !? Пожалуйста помоги! : S

6 ответов

На вашем хосте выполните эту команду:

sudo usermod -a -G vboxusers $USER 

Теперь выполните выход из системы (всегда требуется после добавления текущего пользователя в группу).

После входа проверьте, что вы находитесь в группе vboxusers с этой командой, убедитесь, что vboxusers находится в показанном списке:

Это работает для меня, и моя проблема решена с помощью VirtualBox

sudo usermod -a -G vboxsf your_user_name 

Это бросает меня, что синтаксис не корректен. Использование: gsettings [-schemadir RÉ PERTOIRE2SCHÉ MA] установил SCHÉ MA [: CHEMIN] CLÉ VALEUR. It’ s на французском языке, на английском I’ d говорят it’ s, что: gsettings [-schemadir SCHEMAFOLDER] СХЕМА набора [: ПУТЬ] ЗНАЧЕНИЕ КЛЮЧА. Вы уверены, что синтаксис корректен. – Asu 14 May 2015 в 16:46

  1. Добавьте пользователя в соответствии с другим ответом, используя команду usermod.
  2. Запустите команду id . Вы должны увидеть vboxusers в списке.
  3. Если вы этого не видите, вы можете перезагрузить компьютер и попробовать id снова.

Когда вы получаете список пользователей vbox в результате выполнения id , вы можете использовать USB с виртуальной коробкой.

  • id Это даст вам uid = 1000 ([username]) gid = 1000 ([username]) groups = 1000 ([username]), 10 (wheel), 18 (dialout), 497 (plugdev) если в этом отсутствует vboxusers, то добавьте
  • usermod -a -G vboxusers [имя пользователя]

Добрался Error getting authority: Error initializing authority: Could not connect: No such file or directory (g-io-error-quark, 1) Error to execute operation: No such file or directory . И теперь, что я должен сделать? – Sardinha 8 July 2015 в 18:03

 sudo adduser $ USER vboxusers 

Хотел бы упомянуть для тех, у кого никакое решение не работает, как у меня, убедитесь, что вы являетесь частью группы vboxusers, если она не существует, добавьте группу vboxusers. после этого удалите в настройках USB хоста все фильтры USB ( устройств) у вас есть. перезагрузите гостя. В хосте используйте пустые фильтры, чтобы воссоздать вручную ваши устройства, введите любое имя, просто скопируйте два следующих поля из исходного фильтра, который все еще доступен, перезапустите вашего виртуального гостя. вуаля, ваш устройства есть . это единственный способ, который я нашел, чтобы вытеснить их по крайней мере из десяти других решений. Наслаждайтесь

Другие вопросы по тегам:

Похожие вопросы:

  • Как я могу completly переустанавливать VirtualBox 5.1? — 16 September 2018 14:35
  • Как проверить запросы командной строки, направленные через Скалистую вершину? — 7 February 2013 01:43
  • установлены приложения для всех пользователей или только для той учетной записи, которая их установила? — 23 October 2012 04:06
  • Почему мой пользователь не был назначен группе, к которой я присоединился? — 10 May 2018 15:04
  • виртуальный бокс в хосте Ubuntu не подключен к Интернету — 15 March 2013 00:17
  • Есть ли способ создать виртуальную машину под управлением ОС Android? — 13 June 2013 20:17
  • Как обновить VirtualBox до последней версии? — 10 February 2011 12:01
Читайте также:  Linux cli find files

Источник

How to add users to vboxusers to enable USB usage

I want to use my flashdrive in Windows XP, which I am currently running in Virtualbox, but when I open up the settings to enable usb usage, I get an error:

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 Callee: IMachine

@wesinat0r That’s about shared folders, and this is about directly accessing USB devices (which VirtualBox supports).

6 Answers 6

In your host, run this command:

sudo usermod -a -G vboxusers $USER 

Now perform a logout (always required after add current user to a group).

After login, check that you are in the vboxusers group with this command, make sure that vboxusers is in the shown list:

Actually, for Linux guests + hosts (not exactly the question but helpful), you need to do BOTH sudo usermod -a -G vboxusers «$USER» on the host AND sudo usermod -a -G vboxsf «$USER» on the guest after extension pack install and then reboot the guest.

This works for me and my problem with VirtualBox was solved

sudo usermod -a -G vboxsf "$USER" 

I don’t know why installing VirtualBox does not add that group for you, maybe will it be good idea to add group manually first

  1. Add the user as suggested by other answer using usermod command.
  2. Run the command id . You should see vboxusers in the list.
  3. If you don’t see that, you may restart your computer and try id again.

When you get vboxusers listed as a result of running id , you’re good to use USB with virtual box.

sudo adduser $USER vboxusers 
uid=1000([username]) gid=1000([username]) groups=1000([username]),10(wheel),18(dialout),497(plugdev) 

if vboxusers is missing in that then add it

sudo usermod -a -G vboxusers [username] 

This should resolve the issue

Would like to mentionn for those who no solution work like me, ensure you are part of the group vboxusers, if it does not exist, addgroup vboxusers. after, delete in the host usb settings all the usb filters (devices) you have. reboot the guest In the host, use empty filters to recreate manually your devices, put any name just copy the two following fields from the original filter still available, restart your virtual guest. voila, your devices are there . its the only way i found to force them out of at least ten other solutions.. Enjoy

You must log in to answer this question.

Highly active question. Earn 10 reputation (not counting the association bonus) in order to answer this question. The reputation requirement helps protect this question from spam and non-answer activity.

Читайте также:  Linux listing open ports

Источник

VirtualBox / Shared Folders

This documentation explains how to share folders between Windows host and Linux guest operating system. This allows files to be copied back and forth using a shared folder.

The following documentation was written for Windows 10 and VirtualBox 6.0.4. Windows 11 and newer VitualBox is similar.

Create a Shared Folder on the Windows Host

This step only needs to be completed when initially sharing a Windows folder. Multiple Linux VMs can access the same shared Windows folder(s).

Using shared folders requires that the VirtualBox guest additions are installed. Guest additions can be installed when creating a VM or after importing a VM appliance. If an appliance is imported, it may already have had guest additions installed. For example, see the Debian Jessie Install Guest Additions documentation.

To enable sharing a folder, do the following on the host machine:

  1. Create a convenient folder that can be used for shared files, for example C:\vbshare (or D:\vbshare or another drive).
  2. It is recommended to only share folders necessary to complete work on the VM, not entire Windows file systems.

It is not necessary to set Windows sharing properties on this folder.

Repeat for as many folders need to be shared.

Add Linux User to vboxsf Group

Do the following on the Linux Debian guest. The instructions have been tested on Debian jessie and later.

Make sure that the user is in the vboxsf group, which grants permissions to shared folders, where username is the user to be configured:

$ sudo usermod -a -G vboxsf username 

Then cat /etc/group should show the user listed in the vboxsf group.

Add Shared Folder in the VirtualBox Manager

In VirtualBox Manager, select the VM of interest and open the Shared Folders settings. Then use the Add (plus) button on the right to add a shared folder. For example, the following mounts a guest operating system folder /media/vbshare matching the C:\vbshare host operating system folder, with the following settings:

  • Folder Path — the Windows host operating system folder to share (must exist, otherwise the OK button will be disabled)
  • Folder Name — repeat the folder name from above, which will be used to display the folder name in the guest operating system (this typically auto-fills when the folder path is provided)
  • Read-only
    • typically do not want this to be set because want to allow files to be written from either direction
    • use read-only if Windows files need to be protected against writes
    • if selected, the shared folder is a Machine Folders in the VirtualBox Manager / Shared Folders view and will be mounted when the VM restarts
    • otherwise, will be listed in Transient Folders in the VitualBox Manager / Shared Folders view

    Edit shared folder configuration

    Configure Shared Folder (Editing) (see full-size image)

    Press OK to save the settings, which will display the shared folder as follows.

    Saved shared folder configuration

    Configure Shared Folder (Saved) (see full-size image)

    Press OK to close the window.

    Attempting to list /media/vbshare on the VM may show a permission denied error.

    The following should show the shared drive listed among other file systems:

    $ sudo mount vbshare on /media/vbshare type vboxsf (rw,nodev,relatime,uid=0,gid=999,ttl=0,dmode=0770,fmode=0770,dmask=00,fmask=00,tag=VBoxAutomounter) 

    The sharing can be tested by copying files into the folder from host or guest operating system. This is a convenient way to transfer files between machines. Automated copies can also be used, for example to copy files from a development machine to a test machine during development.

    Источник

    When I add myself «vboxusers» group I an no longer in the «admins» group

    Then you should fix the accepted answer, currently a non-working solution is accepted which will confuse future visitors.

    6 Answers 6

    Your second command is right.

    By default, usermod -G replaces all supplementary groups the user is in (the primary group is generally named the same as your username, and specified separately; don’t mess with that though). By also using -a it appends the groups you give.

    So this should work (and does, for me, just tried it):

    usermod -aG vboxusers myusername 

    If running that command takes you out of any other group then you’ve found a bug. Note you have to relogin to see the effects.

    gpasswd --add myusername vboxusers 

    According to the usermod man page the correct command to add a user to a group is

    sudo usermod -G group -a username 

    or in your case since you want to add your self to the vboxusers group that will be

    sudo usermod -G vboxusers -a $USER 

    Never use the top method to add a user to vboxusers by using the usermod -G vboxusers myusername command. This will make you lose your sudo privileges!

    If you have lost your sudo privileges, you can use the method described here to recover them. It boils down to executing the following command:

    usermod -G adm,cdrom,sudo,dip,plugdev,lpadmin,guoshicheng,vboxusers myusername 

    Welcome to Ask Ubuntu! The question’s author already used the command you’re telling him not to use. He has also already accepted a solution for his problem. There is actually no point in anwering the question again. And linking to a site in Chinese is also not very helpful on an English site.

    @bender Actually there is a point if the answer is valid and on topic. Accepting answer means that it worked for the OP. Please read the about page.

    @Symin: Nevertheless, the question’s author already used this command. Strictly seen, this is already not an answer to the question. The accepted answer already describes in detail what has been done wrong and why, this answer adds (almost) no new information. And describing (once again) how to get back lost privileges has been done many many many times on this site. And just for the sake of completeness, this command won’t work any more after sudo privileges were lost (unless one hasn’t logged off yet or still has an open root shell).

    What you want to do is just open the terminal and vi /etc/group then add of replace vboxusers:x:128:uname (uname of the account), save and log out. Just login and open VirtualBox, Settings -> USB -> Add filter from device. I think it will work.

    Источник

Оцените статью
Adblock
detector