124 lines
3.5 KiB
Groff
124 lines
3.5 KiB
Groff
'\"macro stdmacro
|
|
.TH MULTGRPS 1
|
|
.SH NAME
|
|
multgrps \- spawn a shell with membership in multiple groups
|
|
.SH SYNOPSIS
|
|
.B multgrps
|
|
.RB [ \|\-\| ]
|
|
.SH DESCRIPTION
|
|
.PP
|
|
.I multgrps
|
|
creates a new shell process which is simultaneously a member of all groups
|
|
to which the invoking user belongs.
|
|
.PP
|
|
Every user belongs to a default group specified in \f3/etc/passwd\fP.
|
|
Any additional group memberships are listed in the file
|
|
\f3/etc/group\fP. Traditional System V allows processes to be in only
|
|
one group at any given time; that group may be changed via the
|
|
.IR newgrp (1)
|
|
command. A process has group access privileges only to the files
|
|
whose group
|
|
.SM ID
|
|
matches the process's current value.
|
|
BSD and POSIX systems provide the capability for processes to
|
|
be members of more than one group at a time.
|
|
Since IRIX is based on System V, processes are in single-group mode by
|
|
default.
|
|
The
|
|
.IR multgrps (1)
|
|
command is analogous to
|
|
.IR newgrp (1)
|
|
with the salient difference that the new shell spawned by
|
|
.IR multgrps
|
|
is a member of
|
|
.IR all
|
|
groups with which the user's login name is listed in
|
|
.BR /etc/group ,
|
|
in addition to the group defined in the \f3/etc/passwd\fP entry.
|
|
.PP
|
|
.I multgrps\^
|
|
initializes the group-set of which the calling process (user)
|
|
is a member. It uses an
|
|
.IR initgroups(3X)
|
|
call to obtain the groups from the file
|
|
.BR /etc/group
|
|
or its NIS equivalent, then spawns a new shell which
|
|
is a member of them all.
|
|
The user remains logged in and the current directory is unchanged,
|
|
but calculations of access permissions to files are
|
|
performed with respect to the
|
|
entire set of group
|
|
.SM IDs\*S.
|
|
The user is always given a new shell, replacing the current shell,
|
|
by
|
|
.IR multgrps ,
|
|
regardless of whether the user is a member of any supplemental
|
|
groups. In that
|
|
shell the first group in the list is always the group
|
|
.SM ID
|
|
from the user's entry in the
|
|
.BR /etc/passwd
|
|
file.
|
|
.PP
|
|
Exported variables retain their values after invoking
|
|
.IR multgrps ;
|
|
however, all unexported variables are either reset to their
|
|
default value or set to null.
|
|
System variables (such as PS1, PS2, 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 \f3$\fP (default) and has not exported PS1.
|
|
After an invocation of
|
|
.I multgrps
|
|
their PS1 will be set to the default prompt string \f3$\fP.
|
|
Note that the shell command
|
|
.I export
|
|
(see \f2sh\fP(1))
|
|
is the method of exporting variables so
|
|
that they retain their assigned value when invoking new shells.
|
|
.PP
|
|
If the first argument to
|
|
.I multgrps
|
|
is a
|
|
.BR \- ,
|
|
the environment is changed to what would be expected if the
|
|
user actually logged in again.
|
|
.PP
|
|
The multiple-group shell may be terminated via "exit", which returns
|
|
to the previous shell.
|
|
.PP
|
|
No group password checking is performed. Since
|
|
.BR /etc/group
|
|
is a system file (writable only by superuser), it is assumed that
|
|
protection against unintended group-membership is provided by
|
|
those restricted file permissions.
|
|
.PP
|
|
The set of active group
|
|
.SM IDs\*S
|
|
may be displayed by invoking
|
|
.IR id (1)
|
|
or
|
|
.IR groups (1).
|
|
If
|
|
.I multgrps
|
|
has not been called only the group
|
|
.SM ID
|
|
from the user's entry in
|
|
.BR /etc/passwd
|
|
will be listed.
|
|
.PP
|
|
The maximum number of groups of which a process may
|
|
be a member is defined (as an lbootable option) in
|
|
\f3/var/sysgen/master.d/kernel\fP, named
|
|
.SM
|
|
.BR NGROUPS_MAX .
|
|
.SH FILES
|
|
/etc/group system group file
|
|
.br
|
|
/etc/passwd system password file
|
|
.SH SEE ALSO
|
|
newgrp(1), login(1), id(1), sh(1),
|
|
getgroups(2), setgroups(2), initgroups(3X), group(4), passwd(4), environ(5)
|