initgroups(3) Library Functions Manual initgroups(3)NAME
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(3C) Standard C Library Functions initgroups(3C)NAME
initgroups - initialize the supplementary group access list
SYNOPSIS
#include <grp.h>
#include <sys/types.h>
int initgroups(const char *name, gid_t basegid);
DESCRIPTION
The initgroups() function reads the group database to get the group membership for the user specified by name, and initializes the supple-
mentary group access list of the calling process (see getgrnam(3C) and getgroups(2)). The basegid group ID is also included in the supple-
mentary group access list. This is typically the real group ID from the user database.
While scanning the group database, if the number of groups, including the basegid entry, exceeds NGROUPS_MAX, subsequent group entries are
ignored.
RETURN VALUES
Upon successful completion, 0 is returned. Otherwise, -1 is returned and errno is set to indicate the error.
ERRORS
The initgroups() function will fail and not change the supplementary group access list if:
EPERM The {PRIV_PROC_SETID} privilege is not asserted in the effective set of the calling process.
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|MT-Level |MT-Safe |
+-----------------------------+-----------------------------+
SEE ALSO getgroups(2), getgrnam(3C), attributes(5)SunOS 5.11 22 Mar 2004 initgroups(3C)
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)
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)
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 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)
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)
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)