0

I have added my user to the users group using the following command:

sudo usermod -a -G users foo

However, when I then type the id -Gn command it is not showing the user as being part of the users group. I then try the following and it says it is apart of the users group:

getent group | grep users

Also tried simple id foo command and says it is part of it as well. Why is it not showing in my secondary groups when I use id -Gn?

marked as duplicate by Gilles, jayhendren, G-Man, slm Dec 31 '16 at 4:03

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • Also noticed it shows up when I specify the user name. Using 'id -Gn foo' displays the right groups but 'id -Gn' doesn't. – MrBburn Dec 30 '16 at 12:30
0

Are you sure you are logged as 'foo' when issuing the command 'id -Gn' ? given your explanation and first comment, this could explain that the group appears only when typing 'id -Gn foo'

  • type 'whoami' to see if you're actually logged in as foo – Michael D. Dec 30 '16 at 14:01

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