0

Execute the two commands, that is, adding current user to tcpdump group, then check the result by querying groups. BUT, groups does not report I'm a member of tcpdump why?

Screenshot from Ubuntu 22.04:

enter image description here

At this time, I checked /etc/group file, it has been added.

tcpdump:x:117:chj

In order to see tcpdump listed in groups command, I have to completely log out my desktop session then re-login.

How come it has to be so cumbersome? Am I missing something?

Jimm Chen
  • 341
  • 3
  • 10
  • 1
    Prefer to include terminal output as code formatted text. That focuses on the code only, and users can copy/paste the commands to try for themselves. – vanadium Jul 03 '22 at 08:52
  • 1
    Asked and answered numerous times. Take a look at: https://askubuntu.com/questions/1045993/after-adding-a-group-logoutlogin-is-not-enough-in-18-04 – AnthonyK Jul 03 '22 at 09:01
  • Does this answer your question? [After adding a group, logout+login is not enough in 18.04?](https://askubuntu.com/questions/1045993/after-adding-a-group-logoutlogin-is-not-enough-in-18-04) – muru Mar 22 '23 at 08:19

1 Answers1

2

Try groups $USER to see the changes. Now, you are listing the groups for the current process, which may differ if the groups database has changed.

vanadium
  • 82,909
  • 6
  • 116
  • 186