NEWGRP(C) XENIX System V NEWGRP(C)
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. When most
users log in, they are members of the group named group.
If a group has a password, any user can become a member of
that group by entering the password when prompted by newgrp.
If a group does not have a password, a user can become a
member of it only if the user is listed in /etc/group as a
member of the group. Therefore, group security is stronger
if group passwords are not used.
Files
/etc/group
/etc/passwd
See Also
login(M), group(F), passwd(F)
Notes
A password must be added to the /etc/group file manually;
see group(F) for details. 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.
Page 1 (printed 2/7/91)