Visit Our UNIX and Linux User Community

Linux and UNIX Man Pages

Test Your Knowledge in Computers #363
Difficulty: Medium
uudecode originated in Version 1 AT&T UNIX.
True or False?
Linux & Unix Commands - Search Man Pages

setgroups(2) [bsd man page]

SETGROUPS(2)							System Calls Manual						      SETGROUPS(2)

NAME
setgroups - set group access list SYNOPSIS
#include <sys/param.h> setgroups(ngroups, gidset) int ngroups, *gidset; DESCRIPTION
Setgroups sets the group access list of the current user process according to the array gidset. The parameter ngroups indicates the number of entries in the array and must be no more than NGROUPS, as defined in <sys/param.h>. Only the super-user may set new groups. RETURN VALUE
A 0 value is returned on success, -1 on error, with a error code stored in errno. ERRORS
The setgroups call will fail if: [EPERM] The caller is not the super-user. [EFAULT] The address specified for gidset is outside the process address space. SEE ALSO
getgroups(2), initgroups(3X) BUGS
The gidset array should be of type gid_t, but remains integer for compatibility with earlier systems. 4.2 Berkeley Distribution May 13, 1986 SETGROUPS(2)

Check Out this Related Man Page

SETGROUPS(2)						      BSD System Calls Manual						      SETGROUPS(2)

NAME
setgroups -- set group access list LIBRARY
Standard C Library (libc, -lc) SYNOPSIS
#include <sys/param.h> #include <unistd.h> int setgroups(int ngroups, const gid_t *gidset); DESCRIPTION
setgroups() sets the group access list of the current user process according to the array gidset. The parameter ngroups indicates the number of entries in the array and must be no more than {NGROUPS_MAX}. Only the super-user may set new groups. This system call affects only secondary groups. RETURN VALUES
A 0 value is returned on success, -1 on error, with an error code stored in errno. ERRORS
The setgroups() call will fail if: [EINVAL] The value of ngroups is greater than {NGROUPS_MAX}. [EPERM] The caller is not the super-user. [EFAULT] The address specified for gidset is outside the process address space. SEE ALSO
getgroups(2), setegid(2), setgid(2), setregid(2), initgroups(3) HISTORY
The setgroups() function call appeared in 4.2BSD. BSD
October 7, 2006 BSD

6 More Discussions You Might Find Interesting

1. Programming

setgid

I have a setuid to root program that has now to be changed to setuid to oracle depending on who is running it. Oracle has only two groups, dba (primary) and osgrp1 (secondary). But running 'id' if oracle shows all the secondary groups belonging to root, and only dba or osgrp1 as the primary group... (2 Replies)
Discussion started by: blowtorch
2 Replies

2. Solaris

sshd (openssh) on SunOS without root privileges

Hi, I've just managed to install openssh in my home directory on a server I have access to by using --prefix=$HOME/local after ./configure. Another thing I was having trouble with without root access was privilege separation, so I disabled that in my sshd_config. However, when I run... (10 Replies)
Discussion started by: sayeo
10 Replies

3. AIX

cant su to user or root AIX 5.3

Hi all, I cannt use 'su' to login to root or any other users though everything seems ok. I read some articles that says if you do recursive chmod 777 on /usr it can create this problem. I did the same. can anybody tell me how to repair it. Any ideas will be appreciated. thnks (7 Replies)
Discussion started by: itesh.dash
7 Replies

4. AIX

Cannot create user using SMITTY

i'm using smitty to create user...what happen is it prompt me "failed" with error 3004-703 Check "/etc/security/login.cfg" file. 3004-691 Error changing "shell". 3004-703 Check "/usr/lib/security/mkuser.default" file. 3004-721 Could not create user. 3004-703 Check... (13 Replies)
Discussion started by: thecobra151
13 Replies

5. Ubuntu

Passwordless ssh authentication fails

Unable to set ssh passwordless authentication I am unable to ssh with passwordless authentication from Windows client onto UBuntu server. The ssh version on UBuntu is OpenSSH_5.8p1 Debian-7ubuntu1, OpenSSL 1.0.0e , while SSH on Windows Client is OpenSSH_5.1p1, OpenSSL 0.9.8k. I turned on ssh... (5 Replies)
Discussion started by: tkota
5 Replies

6. Solaris

Rpcbind service not starting

Hello all, I have read just about every rpcbind not starting thread and article on the internet it seems, but I have not found a solution to my problem as of yet. I have a solaris 10 server that has been running with no problems for a while. The other day it crashed and would not boot to the gui... (2 Replies)
Discussion started by: Madrox72
2 Replies

Featured Tech Videos