Sunday, April 28, 2024
 Popular · Latest · Hot · Upcoming
19
rated 0 times [  19] [ 0]  / answers: 1 / hits: 38259  / 2 Years ago, thu, september 29, 2022, 9:24:04

I'm using Ubuntu 11.10 and I installed VirtualBox.



This required me to add myself to the vboxusers group but when I add myself to vboxusers group I am no longer be in other groups and especially admins group!



When I add myself back to admins group I no longer be am in the vboxusers group !



Commands that I used




  • to add user to "vboxusers": usermod -G vboxusers myusername


  • to add user back to admins group in single user mod: usermod -aG admin myusername



More From » virtualbox

 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.


[#40374] Thursday, September 29, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
istmasted

Total Points: 287
Total Questions: 130
Total Answers: 153

Location: Burkina Faso
Member since Thu, Dec 23, 2021
2 Years ago
istmasted questions
;