Files
seta75D ff309bfe1c Init
2021-10-11 18:37:13 -03:00

52 lines
1.3 KiB
Groff

.\" @(#)initgroups.3 1.1 94/10/31 SMI; from UCB 4.2
.TH INITGROUPS 3 "6 October 1987"
.SH NAME
initgroups \- initialize supplementary group IDs
.SH SYNOPSIS
.nf
.B initgroups(name, basegid)
.B char *name;
.B int basegid;
.fi
.IX "initgroups()" "" "\fLinitgroups()\fP \(em initialize supplementary group IDs
.IX "initialize supplementary group IDs" "" "initialize supplementary group \s-1ID\s0s \(em \fLinitgroups()\fP"
.IX "supplementary group IDs" initialize "supplementary group \s-1ID\s0s" "initialize \(em \fLinitgroups()\fP"
.SH DESCRIPTION
.LP
.B initgroups(\|)
reads through the group file and sets up,
using the
.B setgroups
call
(see
.BR getgroups (2V)),
the supplementary group \s-1ID\s0s for the user
specified in
.IR name .
The
.B basegid
is automatically included in the supplementary group \s-1ID\s0s.
Typically this value is given as
the group number from the password file.
.SH FILES
.PD 0
.TP 20
.B /etc/group
.PD
.SH SEE ALSO
.BR getgroups (2V),
.BR getgrent (3V)
.SH DIAGNOSTICS
.LP
.B initgroups(\|)
returns \-1 if it was not invoked by the super-user.
.SH BUGS
.LP
.B initgroups(\|)
uses the routines based on
.BR getgrent (3V).
If the invoking program uses any of these routines,
the group structure will
be overwritten in the call to
.BR initgroups .