Why mkgroup does not list group members?

Corinna Vinschen corinna-cygwin@cygwin.com
Mon May 13 18:06:00 GMT 2013


On May 13 17:53, Lavrentiev, Anton (NIH/NLM/NCBI) [C] wrote:
> > so is extra work for no gain.
> 
> But what if I need to see who's in a particular group?
> 
> Then when I use getgrgid() / getgrnam() (or equivalent), I get an empty list.

In that case, your expectations of the getgrXXX functions are wrong.
The gr_mem field never returned all users belonging to a group.
Historically it only contains users for which this group is a
supplementary group, not a primary group.  It also doesn't make sense to
add all usernames to the gr_mem field of the "Users" group in companies
with thousands of employees, given that all users are member of the
group.


Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Maintainer                 cygwin AT cygwin DOT com
Red Hat

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple



More information about the Cygwin mailing list