Adding a user to new groups in linux is easy -- you just need the following command:
# adduser user group
But this doesn't really do anything till you log off and then log in anew. When you have a GUI session, for instance Xserver, you have to completely shut it down.
I know that there's the newgrp
command to "log in to a new group", but the question is why does the user session have to be restarted so the new group settings could be applied?