Manpage of chgrpsh
Section: User Commands (1)
Return to Main Contents
chgrpsh - fork a shell process or execute a command with a new set of
chgrpsh [ [+|-]groupname ] [-- cmd arg1 ... ]
Chgrpsh forks a new user process in which the group
vector has been changed under user control. Group name arguments
preceded a '+' are added to the group vector; those preceded by '-'
are removed. Trailing arguments without a '+' or '-' (or those
following '--') are assumed to be a command and are executed.
If no command is given an interactive shell is created.
Chgrpsh has two main purposes:
Unix systems impose a limitation (generally from 8 to 32) on the
number of groups a process can be in simultaneously. Chgrpsh
relaxes this restriction somewhat by allowing you to create a shell
process in which some groups have been replaced by others, thus
keeping the total number of groups within the limitation while allowing
you access to groups you have been authorized to join. This is particularly
useful for instructors and teaching assistants who need to deal with class
group protections when grading. For instance, it is not possible to be in all
the groups cseXYZa, cseXYZb, ..., cseXYZz simultaneously. Chgrpsh can
be used to create shells associated with a subset of these groups. E.g.
% chgrpsh +cseXYZa +cseXYZb ... +cseXYZf
% < do some grading >
% chgrpsh +cseXYZg +cseXYZh ....
% < do more grading >
When group membership changes are made, it can take up to an hour for
those changes to propagate to the local /etc/group files of all machines.
And any new groups that
a user may acquire are not automatically added to existing login
sessions, requiring the the user to log out and then log in again to
use their new memberships. However, chgrpsh can be used to
create a shell with any new groups immediately after the main group
database has been updated. Thus if you need to exercise group rights
very soon after you have been added to a group, simply use
chgrpsh -oldgroup +newgroup1 +newgroup2 emacs file
chgrpsh +agroup +bgroup
To determine what groups your process(es) are current using, use the
standard groups(1) command.
Chgrpsh tries to use a local cache of group membership information.
If a group given as an argument is not in the local cache, chgrpsh
will attempt to obtain your group memberships from the Unix group database.
This behavior allows users to short-cut the propagation delay of
/etc/group files created from database content. However,
querying the database requires that you valid Kerberos credentials.
You will not be allowed to replace your login (/etc/passwd) group.
- SEE ALSO
This document was created by
using the manual pages.
Time: 22:48:39 GMT, October 10, 2006