NEWGRP(C) UNIX System V
Name
newgrp - logs user into a new group
Syntax
newgrp [-] GROUP
Description
newgrp changes the group identification of its caller. The
same person remains logged in, and the current directory is
unchanged, but calculations of access permissions to files
are performed with respect to the new group ID.
newgrp without an argument changes the group identification
to the group in the password file. This changes the caller's
group identification back to the original group.
If the first argument to newgrp is a hyphen (-), the user
will actually be logged in again as a member of the new
group, GROUP. (that is, newgrp - GROUP)
If the first argument to newgrp is a `` - ,'' but GROUP is
not specified, the user will be logged in again as a member
of the caller's original group identification according to
the password file.
Files
/etc/group
/etc/passwd
See Also
login(M), group(F)
Notes
The newgrp command executes, but does not fork, a new shell.
If your login shell is a C shell and you invoke newgrp , you
will have to press CTRL-D when you wish to log out. Typing
the csh (C) logout command will result in an error message.
Note also that the newgrp command causes the csh history
list to start again at 1.
Standards Conformance
newgrp is conformant with:
AT&T SVID Issue 2, Select Code 307-127;
and The X/Open Portability Guide II of January 1987.
(printed 8/28/89) NEWGRP(C)