I did a usermod to add the current user user in a group, but when I run id -Gn it only shows the main user's group:[user@computer ~]$ id -Gn userBut when I specify the user, it works normally:[user@computer ~]$ id -Gn useruser newgroupDo you have an idea why it works like it? Am I missing something concerning the groups management in UNIX?
id command doesn't show all user's groups
group
That's because your active set of groups is only determined at login. You'll need to logout and login again to pick up the change and see it reflected by id. You can see this another way by issuing cat /proc/$$/status which lists most of your current (session) process states.