initgroups(3) Library Functions Manual initgroups(3) initgroups - C (libc, -lc) #include #include int initgroups(const char *user, gid_t group); glibc (. feature_test_macros(7)): initgroups(): glibc 2.19: _DEFAULT_SOURCE glibc 2.19 : _BSD_SOURCE initgroups() /etc/group , user. group. user NULL. The initgroups() function returns 0 on success. On error, -1 is returned, and errno is set to indicate the error. ENOMEM . EPERM . setgroups(2). /etc/group attributes(7). +----------------------------+----------------------------------------------------------+--------------------------+ | | | | +----------------------------+----------------------------------------------------------+--------------------------+ |initgroups() | | MT-Safe locale | +----------------------------+----------------------------------------------------------+--------------------------+ None. SVr4, 4.3BSD. getgroups(2), setgroups(2), credentials(7) () Azamat Hackimov , Dmitriy S. Seregin , Yuri Kozlov ; GNU (GNU General Public License - GPL, 3 ) , - . - , , () () () <>. Linux 6.9.1 2 2024 . initgroups(3)