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

Henry Bent henry.r.bent at gmail.com
Tue Nov 16 05:09:28 AEST 2021


On Mon, 15 Nov 2021 at 13:56, Clem Cole <clemc at ccc.com> wrote:

> Henry check out: http://gunkies.org/wiki/UNIX*_System_V_and_4.1C_BSD
> Page 25 describes the new BSD group and identifier scheme.
>

Ah, I see, thanks for the pointer:
"System V uses the old V7/32V group scheme: a user may have access to a
login group (specified in /etc/passwd) and also to several other groups (as
permitted by /etc/group), but may be in only one group at a time."

Looking at
https://github.com/robohack/ucb-csrg-bsd/commits/master/usr.sbin/chown/chgrp.c
, the commit stating "new with multiple groups" is dated March 5, 1982
which would put it around 4.1a.

-Henry


>>
> On Mon, Nov 15, 2021 at 1:51 PM Clem Cole <clemc at ccc.com> wrote:
>
>> 3BSD has the V7 scheme, the new kernel code where there is a group list
>> in the process is not introduced until later/
>>>>
>> On Mon, Nov 15, 2021 at 1:46 PM Henry Bent <henry.r.bent at gmail.com>
>> wrote:
>>
>>> On Mon, 15 Nov 2021 at 13:31, Clem Cole <clemc at ccc.com> wrote:
>>>
>>>> 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.
>>>>
>>>>
>>> Looking at the TUHS archives, unless I'm missing something, 3BSD has
>>> groups that appear to be in the modern format:
>>>
>>> % ls -l /bsd/3bsd/etc/group
>>> -r--r--r-- 1 root root 44 1980-01-02 22:08 /bsd/3bsd/etc/group
>>> % cat /bsd/3bsd/etc/group
>>> staff:*:10:bill,ozalp
>>> grad:*:20:
>>> prof:*:30:
>>> % find . -name 'chgrp*' | xargs ls -l
>>> -r-xr-xr-x 1 root root 6960 Dec 30  1979 ./usr/bin/chgrp
>>> -r--r--r-- 1 root root   26 Feb 12  1979 ./usr/man/man1/chgrp.1
>>> -r--r--r-- 1 root root  754 Feb 12  1979 ./usr/src/cmd/chgrp.c
>>>
>>> -Henry
>>>
>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://minnie.tuhs.org/pipermail/tuhs/attachments/20211115/dadc4a81/attachment.htm>


More information about the TUHS mailing list