The newgrp command changes temporarily the primary group of a user into another group of which that user is a member. In this step, a new shell will be created, and when that user will exit from the shell, his previous group will be reinstated. If no group is specified, the GID is changed to the login GID. The newgrp command does not take input from standard input and cannot be run from within a script.
NOTE: The newgrp command recognizes only group names, not group ID numbers. Your changes only last for the current session. You can only change your real group name to a group you are already a member of. Although if you are a root user, you can change your real group to any group regardless of whether you are a member of it or not.

