SUMMARY: Large group in /etc/group

From: Brian Stormont (brs@cs.brown.edu)
Date: Thu May 28 1992 - 01:48:16 CDT


Thanks to those who responded about the large groups in /etc/group.

It seems there is indeed a limit on the size of a group, although people's
responses, and my own experimentation, seems to show it is less than the
4096 from the ndbm man page (at the end, under BUGS). Sizes of as small as 512K
and as large as 1024K have been suggested as the cut-off pt.

The solution offered by several people was to create multiple groups with
the same group-id, but different group name. This seems to work fine.

Again thankyou to the timely response from all.

Brian

Attached is an edited excerp of responses:

From: fallan@baobab.awadi.com.AU (Frank Allan - Network Manager)

there is a limit, but I am not sure exactly what it is.
(I think it's about 512 chars, but it is different between
4.1.1 and 4.1.2 - slightly less in 4.1.2 I believe)

We had similar problems and the advice from SUN was to
split users across 2 groups with the SAME group id, but
a different name eg:

project1a:*:310:user1,user2,user3,........
project1b:*:310:user15,user16,user17,........

From: Mike Raffety <miker@sbcoc.com>

ndbm (which is what creates NIS maps) limits entries to 4096 bytes.
No, there's no "continuation" ... but you may be able to work around
it by making a second group with the same group ID.

From: fabrice@sj.ate.slb.com (Fabrice Guerini)

As TFM says:

        NDBM(3) C LIBRARY FUNCTIONS NDBM(3)

        BUGS

             The sum of the sizes of a key/content pair must not exceed
             the internal block size (currently 4096 bytes). Moreover
             all key/content pairs that hash together must fit on a sin-
             gle block. dbm_store() will return an error in the event
             that a disk block fills with inseparable data.

        Sun Release 4.1 Last change: 24 November 1987 3

From: frankm@shadow.cna.tek.com (Frank 'Scruff' Miller)

dbm can only handle up to 1024 when it builds its maps for NIS for
its tables (including group).

From: ndd@bal1.mc.duke.edu (Ned Danieley)

when you do your make in /var/yp, are you doing 'make group'? if so,
that could be your problem. try just doing make, and see if all the
programs then agree on group membership.

From: Charles <mcgrew@cs.rutgers.edu>

   We get around this by creating two groups with the same gid, e.g.

        groupname::1234:users....
        groupname2::1234:more users...

... although a "groups" will return semi-random results (mostly depending
on whether you're on the ypmaster or not), the effect will be correct,
since the gid will be correct.

From: Howie Kaye <howie@ivory.cc.columbia.edu>

yes. The getgrent() code has a fairly short buffer. I think the line
length can be up to BUFSIZ (1024 on a sun), and you can have at most 200
...
[My apologies to Howie's response, I accidently deleted part of it. :-(
        -Brian]



This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:06:42 CDT