Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ initgroups(3) — AIX/RT 2.2.1

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

getgroups

setgroups

getgrent, getgrgid, getgrnam, setgrent, endgrent

adduser

     initgroups

Purpose

     Initializes group access list.

Library

     Standard C Library (libc.a)

Syntax

     int initgroups (user, basegid)
     char  *user;
     int basegid;

Description

     The initgroups  subroutine reads the /etc/group  file and
     constructs the group access list  for the user whose name
     is specified  by the user parameter.   The basegid param-
     eter is  usually the group number  from the /etc/password
     file and, it is automatically included in the group list.

     Warning:   The initgroups  subroutine  uses the  getgrent
     subroutines.  If the program that invokes initgroups uses
     any of  these subroutines, then calling  initgroups over-
     writes the static group structure.

Return Value

     Upon  successful  completion, the  initgroups  subroutine
     returns a  value of 0.  If  the effective user ID  of the
     calling process is not superuser, then initgroups returns
     a value of 1.

File

     /etc/group

Related Information

     In this  book:  "getgroups," "setgroups,"  and "getgrent,
     getgrgid, getgrnam, setgrent, endgrent,"

     The adduser command in AIX Operating System Commands Ref-
     erence.

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026