5

I've recently uninstalled virtualbox and since then, everytime I open a terminal I get the following:

groups: cannot find name for group ID 125

The output of /etc/group is here:

http://pastebin.com/gysgpHra

I didn't want to paste the full output here, it's a bit long.

Strangely enough, there is no group 125 but as far as I remember that was assigned to the vboxusers group.

Google has not been helpful at all.

I see a similar question here:

https://askubuntu.com/questions/131651/cannot-find-name-for-group-id-127

But I don't know what he's talking about here:

But I've found it in the group- list

Entry vboxusers:x:127:peter

Can anyone point me the right direction?

2

5 Answers 5

3

You could use sudo delgroup vboxusers to completely remove that group, if the uninstallation of Virtualbox failed to do that. Then enter id in the terminal and your uid, gid, and the groups you belong to will be listed, and vboxusers shouldn't be there.

If this does not work you could simply reinstall Virtualbox with sudo apt-get install --reinstall <virtualbox pkg names> and then you might be able to remove the package cleanly with sudo apt-get purge <virtualbox version> (which would remove any configuration files) and then you could use sudo apt-get autoremove to remove any other files left by Virtualbox. Then you could try my first suggestion again.

Lastly, if these options are unsuccessful, but installing Virtualbox does show that group 125 is virtualbox, you could remove the Virtualbox users group (as detailed in my first suggestion with sudo delgroup vboxusers), before you uninstall Virtualbox. This may work as Virtualbox doesn't seem to be uninstalling correctly and seems to be leaving a partial group that can't easily be removed after uninstallation as it doesn't show up in /etc/group.

It also should be said that you need to logout and login again for any changes to users and groups to take effect.

7
  • I tried all solutions mentioned in this post but id 125 is still there: uid=1000(michael) gid=1000(michael) groups=1000(michael),4(adm),24(cdrom),27(sudo),30(dip),46(plugdev),109(lpadmin),124(sambashare),125 - when I reinstall virtualbox, 125 does show that it's vboxusers.
    – darknomel
    Jul 26, 2012 at 12:08
  • 1
    Well, this is what I usually do when I get an error about a missing group; I'll see if I can think of something else to try.
    – user76204
    Jul 26, 2012 at 12:13
  • 1
    I've edited my post with another suggestion; it might be helpful.
    – user76204
    Jul 26, 2012 at 12:27
  • Same thing. 125 still just sits in my id :(
    – darknomel
    Jul 26, 2012 at 12:58
  • Did you logout and login again?
    – user76204
    Jul 26, 2012 at 13:00
2

I had the same problem, and the reason was that I added user to a group docker manually with

sudo usermod -a -G docker hassan

and later when I uninstalled docker.io, I removed the group with

sudo groupdel docker

so after that, I used to get the following:

$ groups
hassan adm cdrom sudo dip plugdev lpadmin sambashare libvirtd
groups: cannot find name for group ID 999

So to fix this I simply logged out and logged back in and that was it. You can test simply by doing AltCtrlF2 and login in. Then give the groups command and you will not see the same error message again.

1
  • indeed, I suspected me removing docker was the issue, but wasn't sure how to check and resolve. It seems on my machine as well docker had 999 as id. Thanks for mentioning the solution, even though it seems simple. May 23, 2022 at 13:28
1

I had the same issue. The problem was actually prety simple. In my case, someone had changed the priviledges of /etc/group, and had removed all rwx from me. So the system saw I did not have the priviledge to access the name of the group I nbelonged, so it printed this message. Maybe something similar migh be happening in your case.

1

I had the same problem after uninstalling Chrome Remote Desktop for Linux, except in my case it was gid 1003:

groups: cannot find name for group ID 1003
paul@Chameleon:~$ groups
paul adm cdrom sudo audio dip video plugdev lpadmin pulse sambashare vboxusers groups: cannot find name for group ID 1003
1003
paul@Chameleon:~$

What resolved the issue for me was rewriting the user account's groups using the usermod command:

sudo usermod -G paul,adm,cdrom,sudo,audio,dip,video,plugdev,lpadmin,sambashare,vboxusers,pulse  paul

After issuing that command, I verified it resolved the issue by switching to VT1 (Ctrl+Alt+F1), logged in, and observed the error was no longer displayed.

-2

Check /etc/nscd.conf make sure that the following line is there:

 enable-cache            group           yes
0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.