1

I'm wondering why I get different results from id and group on one hand, and getent group on the other. Steps to reproduce:

$ sudo usermod -a -G libvirt eric
$ groups
eric adm cdrom sudo dip plugdev lpadmin sambashare
$ id
uid=1000(eric) gid=1000(eric) groups=1000(eric),4(adm),24(cdrom),27(sudo),30(dip),46(plugdev),119(lpadmin),128(sambashare)
$ getent group | grep libvirt
libvirt:x:136:eric
libvirt-qemu:x:64055:libvirt-qemu
libvirt-dnsmasq:x:137:

The user eric is clearly a member of libvirt. Why doesn't this show up with id and group? Thanks.

System: Ubuntu Budgie 18.04 4.15.0-34-generic

rdimaio
  • 325
  • 2
  • 3
  • 15
ElToro1966
  • 831
  • 1
  • 8
  • 20
  • 1
    If I remember correctly, you'd need to either log out and back in or run `newgrp libvirt` to make the new group ownership effective. – Robert Sep 27 '18 at 17:17
  • Yup @Robert. Both works. Thx. If you post your comment as an answer, I'll mark it as such. – ElToro1966 Sep 30 '18 at 11:00

1 Answers1

1

If I remember correctly, you'd need to either log out and back in or run newgrp libvirt to make the new group ownership effective.

Robert
  • 7,394
  • 40
  • 45
  • 64