NEWGRP(1) DOMAIN/IX Reference Manual (SYS5) NEWGRP(1)
NAME
newgrp - log in to a new group
USAGE
newgrp [ - ] [ group ]
DESCRIPTION
The newgrp command changes your group identification.
Although you remain logged in during the process, and your
current directory is unchanged, newgrp sets new real and
effective group IDs. The shell then performs calculations of
access permissions to files with respect to these new IDs.
You are always given a new shell to replace the current
shell, regardless of whether newgrp terminates successfully
or due to an error condition (e.g., unknown group).
Exported variables retain their values after you invoke
newgrp. All unexported variables, however, are either reset
to their default value or set to null. Unless you or the
system itself exports system variables (e.g., PS1, PS2,
PATH, MAIL, HOME), they are reset to default values. For
example, suppose you have a primary prompt string (PS1)
other than the default, a pound sign (#), and you have not
exported PS1. After invoking newgrp, successfully or not,
your PS1 variable is set to the default prompt string, the
pound sign (#). Use the shell command, export, to export
variables so that they retain their assigned value when
invoking new shells. See sh(1) for more information.
With no arguments, newgrp changes the group identification
back to the group specified in the your password file entry.
If the first argument to newgrp is a dash (-), the environ-
ment changes to one that you would normally expect if you
logged in again.
The newgrp command lets you change to any group of which you
are a member. The /etc/group file contains a list of all
groups and the group's members. This information is compiled
by crpasswd(1M) from the registry files. You are a member of
all groups for which you have an account. For example, if
you have the following three registry accounts,
user1.project1.org
user1.project2.org
user1.project3.org
you are listed three times in the /etc/group file.
The /etc/passwd file contains your default group. Even
though this may not appear in the /etc/group file, this
group is always available as an option to the newgrp com-
mand.
Printed 1/27/86 NEWGRP-1
NEWGRP(1) DOMAIN/IX Reference Manual (SYS5) NEWGRP(1)
CAUTIONS
There is no convenient way to enter a password into
/etc/group. Use of group passwords is not encouraged,
because, by their very nature, they encourage poor security
practices.
FILES
/etc/group system's group file
/etc/passwd system's password file
RELATION INFORMATION
login(1)
sh(1)
group(4)
passwd(4)
environ(5)
NEWGRP-2 Printed 1/27/86