Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

initgroups(3) [osf1 man page]

initgroups(3)						     Library Functions Manual						     initgroups(3)

initgroups - Initializes concurrent group set LIBRARY
Standard C Library (libc.a) SYNOPSIS
int initgroups ( char *user, gid_t base_gid ); PARAMETERS
Specifies the user whose groups are to be used to initialize the group set. Specifies an additional group to include in the group set. DESCRIPTION
The initgroups() function reads the defined group membership of the specified user and sets the concurrent group set of the current process to that value. The base_gid parameter is always included in the concurrent group set, and is normally the principal user's group. If the user is in more than NGROUPS_MAX groups, only NGROUPS_MAX groups are set, including the base_gid group. CAUTION
The initgroups() function uses the sia_get_groups() function to set up the group array. If the program that invokes initgroups() uses any of these functions, then calling initgroups() overwrites the static group structure. RETURN VALUES
Upon successful completion, the initgroups() function returns 0 (zero). If the initgroups() function fails, 1 is returned and errno is set to indicate the error. ERRORS
If the initgroups() function fails, errno may be set to the following value: The calling process does not have the appropriate privilege in its current effective privilege set. RELATED INFORMATION
Functions: getgroups(2), setgroups(2), getgid(2) sia_get_groups(3) Commands: groups(1) delim off initgroups(3)

Check Out this Related Man Page

INITGROUPS(3)						     Linux Programmer's Manual						     INITGROUPS(3)

initgroups - initialize the supplementary group access list SYNOPSIS
#include <grp.h> #include <sys/types.h> int initgroups(const char *user, gid_t group); DESCRIPTION
The initgroups() function initializes the group access list by reading the group database /etc/group and using all groups of which user is a member. The additional group group is also added to the list. RETURN VALUE
The initgroups() function returns 0 on success, or -1 if an error occurs. ERRORS
EPERM The calling process does not have sufficient privileges. ENOMEM Insufficient memory to allocate group information structure. FILES
/etc/group group database file CONFORMING TO
The prototype for initgroups is only available if _BSD_SOURCE is defined (either explicitly, or implicitly, by not defining _POSIX_SOURCE or compiling with the -ansi flag). SEE ALSO
getgroups(2), setgroups(2) GNU
1993-04-05 INITGROUPS(3)
Man Page

9 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Adding user to groups

How do I add a user to a group? And how do I determine the list of groups to add a user? Solaris 10 newbie (1 Reply)
Discussion started by: peteythapitbull
1 Replies

2. IP Networking

concurrent udp server

Just like concurrent tcp server, anyone know how to design the concurrent udp server with the thread? it's best to give some basic examples,thanks (0 Replies)
Discussion started by: Frank2004
0 Replies

3. HP-UX

Adding user to a group without SAM

How can I add a user to a specific group without using SAM? I know I can user modprpw -G, but that will overwrite any groups the user is in with the ones I specify. I need to assume that I do not know what groups the user is already in, so I can't put them in the modprpw command. I just need... (2 Replies)
Discussion started by: paqman
2 Replies

4. UNIX for Dummies Questions & Answers

how can i add a user to a group

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)
Discussion started by: arunkumar_mca
4 Replies

5. UNIX for Dummies Questions & Answers

How to create/restrict a user with to have no privilege from other group

Hello experts I am new to Unix. Env : HPUX I need to create a user say testuser such that it does not have access to file/directories from the other group i.e the last 3 digits . How do I do that. Reason for such a request :- I have an existing user oracle which has default umask... (3 Replies)
Discussion started by: simonsimon
3 Replies

6. AIX

Nested user groups

Is there a command to nest a group in another group in AIX. (2 Replies)
Discussion started by: daveisme
2 Replies

7. AIX

VIO LPM - concurrent LPM limit

Anyone aware of what is the limit on the concurrent number of LPM's possible on vios 2.1 /2.2 ? (2 Replies)
Discussion started by: mk8570
2 Replies

8. AIX

Difference between concurrent and enhanced concurrent VG

Hi, What are the differences between concurrent and enhanced concurrent VGs.? Any advantages of enhanced concurrent VG over normal concurrent vg Regards, Siva (2 Replies)
Discussion started by: ksgnathan
2 Replies

9. Shell Programming and Scripting

How to end a host concurrent program in WARNING status?

Hi All, I have a requirement to make a oracle concurrent program end with warning based on a given condition. If the condition is true, the concurrent program should end with completed warning status. The host program I am using is a shell script that checks if a file exists. ... (2 Replies)
Discussion started by: megha2525
2 Replies