jLuger.de - Use new group rights under Linux

When multiple users should have access to a file/resource under linux you create a group and add each user to the group. When you add a user that is currently logged in he should log out and in again to get the new group to this group list. This worked fine for me since several years until recently. A coworker added me to a group while I was logged in via ssh.

I logged out and in again. Business as usual. But this time the new group wasn't in my list when I checked with id. I did the log out and in game several times but things didn't change. As restarting of the machine or the ssh server wasn't an option I had to find another way to get the group in my list. I've did some googling and found the answer on superuser.

The command newgrp allows to specify a group where you are in and will ensure that it is in your group list.