GETGROUPLIST(3) BSD Library Functions Manual GETGROUPLIST(3)NAME
getgrouplist -- calculate group access list
LIBRARY
Standard C Library (libc, -lc)
SYNOPSIS
#include <unistd.h>
int
getgrouplist(const char *name, int basegid, int *groups, int *ngroups);
DESCRIPTION
The getgrouplist() function reads through the group file and calculates the group access list for the user specified in name. The basegid is
automatically included in the groups list. Typically this value is given as the group number from the password file.
The resulting group list is returned in the array pointed to by groups. The caller specifies the size of the groups array in the integer
pointed to by ngroups; the actual number of groups found is returned in ngroups.
RETURN VALUES
The getgrouplist() function returns -1 if the size of the group list is too small to hold all the user's groups. Here, the group array will
be filled with as many groups as will fit.
FILES
/etc/group group membership list
SEE ALSO setgroups(2), initgroups(3)HISTORY
The getgrouplist() function first appeared in 4.4BSD.
BUGS
The getgrouplist() function uses the routines based on getgrent(3). If the invoking program uses any of these routines, the group structure
will be overwritten in the call to getgrouplist().
BSD June 9, 1993 BSD
Check Out this Related Man Page
GETGROUPLIST(3) BSD Library Functions Manual GETGROUPLIST(3)NAME
getgrouplist -- calculate group access list
LIBRARY
Standard C Library (libc, -lc)
SYNOPSIS
#include <unistd.h>
int
getgrouplist(const char *name, gid_t basegid, gid_t *groups, int *ngroups);
DESCRIPTION
The getgrouplist() function reads through the group file and calculates the group access list for the user specified in name. The basegid is
automatically included in the groups list. Typically this value is given as the group number from the password file.
The resulting group list is returned in the array pointed to by groups. The caller specifies the size of the groups array in the integer
pointed to by ngroups; the actual number of groups found is returned in ngroups.
RETURN VALUES
The getgrouplist() function returns 0 on success and -1 if the size of the group list is too small to hold all the user's groups. Here, the
group array will be filled with as many groups as will fit.
FILES
/etc/group group membership list
SEE ALSO setgroups(2), initgroups(3)HISTORY
The getgrouplist() function first appeared in 4.4BSD.
BSD October 26, 2014 BSD
Hi I have a user zak and
4 groups:-
oracle
stats
data
archive
I want user zak to be part of the oracle and stats group but not be able to view,list anything in data and archive. Also anyone in the data and archive group should not be able to view,list anything in oracle and stats....... (3 Replies)
Hello
A couple of weeks ago, I added a user to an AIX 5.3 system.
I go to add one today, and it appears that when creating a user in smit, I cannot see any groups.
No primary groups
No Group set
No Admin Groups
The /etc/group and etc/secuity/group files seem to be intact.
I did... (4 Replies)
All,
How i can add a user to a group so that the user will ahve all permsion on that directory .
(sys12:pnl:/work/cn/>) groups crcv1
canusr
and
(sys12:pnl:/work/cn/>) groups pfmgr
pfw users
i am having the .ssh in the directory /work/cn/ which has permision as drwx------ .
... (4 Replies)
Hello
They have ordered to me that makes several small utilities in C/C++ for the servants, among them a small program in C/C++ to generate a file HTML with the groups of that servant and in addition that is the corresponding users of that group.
For example of a group:
Group: Sys Members:... (2 Replies)
Hi,
cut -d: -f1,3 /etc/group >rpt.out
I have a doubt in perl. right i am getting list of group user id into rpt.out file. instead i need to store it as an array in perl script. could you please tell me how can i get list of user into an array in perl script..
thanks in advance. (1 Reply)
Hi,
cut -d: -f1,3 /etc/group >rpt.out
I have a doubt in above unix commands. right i am getting list of group user id into rpt.out file. instead i need to store it as an array. could you please tell me how can i get list of user into an array..
If u could tell me give me in perl script... (2 Replies)
What's the difference between groups and id-a.
We're using LDAP, rather than NIS+, and a user has been added to an extra Unix group. The groups command shows the new group but id -a doesn't!
Why would this be? (5 Replies)