newgrp(1) DG/UX R4.11 newgrp(1)
NAME
newgrp - log in to a new group
SYNOPSIS
newgrp [-] [group]
DESCRIPTION
Newgrp changes a user's group identification. The user remains
logged in and the current directory is unchanged, but calculations of
access permissions to files are performed with respect to the new
real and effective group, and current supplementary group IDs. The
user is always given a new shell, replacing the current shell, by
newgrp, regardless of whether it terminated successfully or
terminated due to an error condition (i.e., unknown group).
Exported variables retain their values after invoking newgrp;
however, all unexported variables are either reset to their default
value or set to null. System variables (such as PATH, MAIL, and
HOME), unless exported by the system or explicitly exported by the
user, are reset to default values. For example, a user has a primary
prompt string (PS1) other than $ (default) and has not exported PS1.
After an invocation of newgrp, successful or not, the user's PS1 is
set to the default prompt string $. Note that the shell command
export (see sh(1)) and the C shell command setenv (see csh(1)) export
variables so that they retain their assigned value when invoking new
shells.
With no arguments, newgrp changes the group identification back to
the group specified in the user's password file entry.
If the first argument to newgrp is a -, the environment is changed to
what would be expected if the user actually logged in again.
A password is demanded if the group has a password and the user does
not, or if the group has a password and the user is not listed in
/etc/group as a member of that group.
FILES
/etc/group System's group file
/etc/passwd System's password file
SEE ALSO
login(1), sh(1), csh(1). group(4), passwd(4),
appropriateprivilege(5), capdefaults(5), environ(5).
NOTE
You must have appropriate privilege to execute newgrp. For systems
supporting the DG/UX Capability Option, appropriate privilege is
defined as having one or more specific capabilities enabled in the
effective capability set of the user. See capdefaults(5) for the
default capabilities for this command.
On systems without the DG/UX Capability Option, appropriate privilege
means that your process has an effective UID of root. See the
appropriateprivilege(5) man page for more information.
BUGS
There is no convenient way to enter a password into /etc/group. Use
of group passwords is not encouraged, since they encourage poor
security practices. Group passwords may disappear in the future.
Licensed material--property of copyright holder(s)