[TUHS] [COFF] Will someone please explain the history and usage of gpasswd / newgrp / sg?

Clem Cole clemc at ccc.com
Tue Nov 16 04:29:29 AEST 2021


Grant,

Mashey and crew basically did most of the original group work as part of
PWB.   If you look at the Sixth Edition sources and the PWB 1.0 stuff, that
is one of the places you will find differences.  With Seventh Edition (or I
believe as part of the UNIX/TS work that Ken picked up), the Mashey group
changes went back into the Research stream. With one of the predecessors to
4.2BSD (it may have 4.1A or 4.1B but frankly I have forgotten) Joy
introduced the group scheme we all use today.

The Mashey scheme allowed an UID to be assigned to multiple groups, but
only use (be in) a single group during the process lifetime.  IIRC the RJE
system was based on it, but there were some other scripts that the PWB team
needed. Check the original PWB docs, there is some explanation of them.
FWIW: new group was added to be similar to switch user (su), to change the
gid when the setguid bit was not set on the file.   The truth is the early
group stuff was not used by most admins.

With BSD and use of UNIX for large systems (particularly academic teaching
systems), the desire to have some processes be in more than one group and
be able to test the group file protections accordingly was desired -- for
things like creating a group for each class - where the hand in system was
write-only to the class's TA who was also part of the group.

I'm sure it was used in many other ways, but that was certainly one scheme
we used at UCB when wnj added them.  Again check the 4.2 docs, where the
BSD group scheme is explained.   This did seem useful and System V picked
it up also fairly soon after BSD released it to the world, and fortunately
did not change the BSD semantics.
ᐧ

On Mon, Nov 15, 2021 at 11:12 AM Grant Taylor via COFF <coff at minnie.tuhs.org>
wrote:

> Hi,
>
> Will someone please explain the history and usage of gpasswd / newgrp / sg?
>
> I've run across them again recently while reading old Unix texts.  I've
> been aware of them for years, but I've never actually used them for
> anything beyond kicking the tires.  So I figured that I'd inquire of the
> hive mind that is TUHS / COFF.
>
> When was the concept of group passwords introduced?
>
> What was the problem that group passwords were the solution for?
>
> How common was the use of group passwords?
>
> I ran into one comment indicating that they used newgrp to work around a
> limitation in the number of (secondary) groups in relation to an NFS
> implementation.  Specifically that the implementation of NFS they were
> using didn't support more than 16 groups.  So they would switch their
> primary group to work around this limit.
>
> Does anyone have any interesting stories related to group passwords /
> gpasswd / newgrp / sg?
>
>
>
> --
> Grant. . . .
> unix || die
>
> _______________________________________________
> COFF mailing list
> COFF at minnie.tuhs.org
> https://minnie.tuhs.org/cgi-bin/mailman/listinfo/coff
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://minnie.tuhs.org/pipermail/tuhs/attachments/20211115/107be72a/attachment.htm>


More information about the TUHS mailing list