INITGROUPS(3C) — HP-UX
NAME
initgroups − initialize group access list
SYNOPSIS
initgroups(name, basegid)
char *name;
int basegid;
DESCRIPTION
Initgroups reads the login group file, /etc/logingroup, and sets up the group access list for the user specified by name, using the setgroups(2) system call. If the value of basegid is zero or positive, it is automatically included in the groups list. Typically this value is given as the group number from the password file. If the login group file does not exist or is empty, basegid is the only member of the list.
DIAGNOSTICS
Initgroups returns −1 if it was not invoked by the super-user.
WARNINGS
Initgroups uses the routines based on getgrent(3C). If the invoking program uses any of these routines, the group structure is overwritten by the call to initgroups.
On many systems, no one seems to keep /etc/logingroup up to date.
AUTHOR
Initgroups was developed by the University of California, Berkeley.
FILES
/etc/logingrouplogin group file
SEE ALSO
login(1), su(1), setgroups(2), group(4).
Hewlett-Packard Company — May 11, 2021