The Unix Heritage Society mailing list
 help / color / mirror / Atom feed
* [TUHS] Will someone please explain the history and usage of gpasswd / newgrp / sg?
@ 2021-11-15 16:11 Grant Taylor via TUHS
  2021-11-15 16:26 ` [TUHS] [COFF] " Arrigo Triulzi via TUHS
                   ` (2 more replies)
  0 siblings, 3 replies; 11+ messages in thread
From: Grant Taylor via TUHS @ 2021-11-15 16:11 UTC (permalink / raw)
  To: The Unix Heritage Society, COFF

[-- Attachment #1: Type: text/plain, Size: 979 bytes --]

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


[-- Attachment #2: S/MIME Cryptographic Signature --]
[-- Type: application/pkcs7-signature, Size: 4013 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [TUHS] [COFF] Will someone please explain the history and usage of gpasswd / newgrp / sg?
  2021-11-15 16:11 [TUHS] Will someone please explain the history and usage of gpasswd / newgrp / sg? Grant Taylor via TUHS
@ 2021-11-15 16:26 ` Arrigo Triulzi via TUHS
  2021-11-15 17:51 ` [TUHS] " Jon Steinhart
  2021-11-15 18:29 ` [TUHS] [COFF] " Clem Cole
  2 siblings, 0 replies; 11+ messages in thread
From: Arrigo Triulzi via TUHS @ 2021-11-15 16:26 UTC (permalink / raw)
  To: Grant Taylor; +Cc: The Unix Heritage Society, COFF

On 15 Nov 2021, at 17:11, Grant Taylor via COFF <coff@minnie.tuhs.org> wrote:
> 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.

The only time I ever used it was back in the early ‘90s when on a SunOS system (dirac, for friends) it was used to allow graduate students access to the grading database (i.e. a text file) which was within a directory normally only accessible to teaching staff. The directory was group writable to a special “marking group” to which the various graduate students were added each term.

We’d "newgrp grades” and type the password we had been given to be able to edit the file and add the grades for the assessments we had marked (for food money).

I eventually became root on the machine and found my “su -“ screen to be a faster solution to accessing the file (sorry Franco, should you ever read this).

Cheers,

Arrigo 


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [TUHS] Will someone please explain the history and usage of gpasswd / newgrp / sg?
  2021-11-15 16:11 [TUHS] Will someone please explain the history and usage of gpasswd / newgrp / sg? Grant Taylor via TUHS
  2021-11-15 16:26 ` [TUHS] [COFF] " Arrigo Triulzi via TUHS
@ 2021-11-15 17:51 ` Jon Steinhart
  2021-11-15 18:29 ` [TUHS] [COFF] " Clem Cole
  2 siblings, 0 replies; 11+ messages in thread
From: Jon Steinhart @ 2021-11-15 17:51 UTC (permalink / raw)
  To: The Unix Heritage Society

Grant Taylor via TUHS writes:
> Does anyone have any interesting stories related to group passwords /
> gpasswd / newgrp / sg?

Well, the most interesting one that I can remember was that there was
a bug in 4.1BSD ?? where if you did newgrp and typed in an incorrect
password it would make you root.

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [TUHS] [COFF] Will someone please explain the history and usage of gpasswd / newgrp / sg?
  2021-11-15 16:11 [TUHS] Will someone please explain the history and usage of gpasswd / newgrp / sg? Grant Taylor via TUHS
  2021-11-15 16:26 ` [TUHS] [COFF] " Arrigo Triulzi via TUHS
  2021-11-15 17:51 ` [TUHS] " Jon Steinhart
@ 2021-11-15 18:29 ` Clem Cole
  2021-11-15 18:46   ` Henry Bent
  2021-11-15 20:17   ` arnold
  2 siblings, 2 replies; 11+ messages in thread
From: Clem Cole @ 2021-11-15 18:29 UTC (permalink / raw)
  To: Grant Taylor; +Cc: The Unix Heritage Society, COFF

[-- Attachment #1: Type: text/plain, Size: 2975 bytes --]

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@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@minnie.tuhs.org
> https://minnie.tuhs.org/cgi-bin/mailman/listinfo/coff
>

[-- Attachment #2: Type: text/html, Size: 4540 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [TUHS] [COFF] Will someone please explain the history and usage of gpasswd / newgrp / sg?
  2021-11-15 18:29 ` [TUHS] [COFF] " Clem Cole
@ 2021-11-15 18:46   ` Henry Bent
  2021-11-15 18:51     ` Clem Cole
  2021-11-15 20:17   ` arnold
  1 sibling, 1 reply; 11+ messages in thread
From: Henry Bent @ 2021-11-15 18:46 UTC (permalink / raw)
  To: Clem Cole; +Cc: The Unix Heritage Society, COFF, Grant Taylor

[-- Attachment #1: Type: text/plain, Size: 1089 bytes --]

On Mon, 15 Nov 2021 at 13:31, Clem Cole <clemc@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

[-- Attachment #2: Type: text/html, Size: 1681 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [TUHS] [COFF] Will someone please explain the history and usage of gpasswd / newgrp / sg?
  2021-11-15 18:46   ` Henry Bent
@ 2021-11-15 18:51     ` Clem Cole
  2021-11-15 18:54       ` Warner Losh
  2021-11-15 18:56       ` Clem Cole
  0 siblings, 2 replies; 11+ messages in thread
From: Clem Cole @ 2021-11-15 18:51 UTC (permalink / raw)
  To: Henry Bent; +Cc: The Unix Heritage Society, COFF, Grant Taylor

[-- Attachment #1: Type: text/plain, Size: 1367 bytes --]

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@gmail.com> wrote:

> On Mon, 15 Nov 2021 at 13:31, Clem Cole <clemc@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
>

[-- Attachment #2: Type: text/html, Size: 2553 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [TUHS] [COFF] Will someone please explain the history and usage of gpasswd / newgrp / sg?
  2021-11-15 18:51     ` Clem Cole
@ 2021-11-15 18:54       ` Warner Losh
  2021-11-15 18:56       ` Clem Cole
  1 sibling, 0 replies; 11+ messages in thread
From: Warner Losh @ 2021-11-15 18:54 UTC (permalink / raw)
  To: Clem Cole; +Cc: The Unix Heritage Society, COFF, Grant Taylor

[-- Attachment #1: Type: text/plain, Size: 1730 bytes --]

Yes. V7 had chgrp too. It dealt only with adjusting the group "ownership"
of a file.

Warner

On Mon, Nov 15, 2021 at 11:52 AM Clem Cole <clemc@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@gmail.com> wrote:
>
>> On Mon, 15 Nov 2021 at 13:31, Clem Cole <clemc@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
>>
> _______________________________________________
> COFF mailing list
> COFF@minnie.tuhs.org
> https://minnie.tuhs.org/cgi-bin/mailman/listinfo/coff
>

[-- Attachment #2: Type: text/html, Size: 3363 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [TUHS] [COFF] Will someone please explain the history and usage of gpasswd / newgrp / sg?
  2021-11-15 18:51     ` Clem Cole
  2021-11-15 18:54       ` Warner Losh
@ 2021-11-15 18:56       ` Clem Cole
  2021-11-15 19:09         ` Henry Bent
  1 sibling, 1 reply; 11+ messages in thread
From: Clem Cole @ 2021-11-15 18:56 UTC (permalink / raw)
  To: Henry Bent; +Cc: The Unix Heritage Society, COFF, Grant Taylor

[-- Attachment #1: Type: text/plain, Size: 1614 bytes --]

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

On Mon, Nov 15, 2021 at 1:51 PM Clem Cole <clemc@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@gmail.com> wrote:
>
>> On Mon, 15 Nov 2021 at 13:31, Clem Cole <clemc@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
>>
>

[-- Attachment #2: Type: text/html, Size: 3569 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [TUHS] [COFF] Will someone please explain the history and usage of gpasswd / newgrp / sg?
  2021-11-15 18:56       ` Clem Cole
@ 2021-11-15 19:09         ` Henry Bent
  0 siblings, 0 replies; 11+ messages in thread
From: Henry Bent @ 2021-11-15 19:09 UTC (permalink / raw)
  To: Clem Cole; +Cc: The Unix Heritage Society, COFF, Grant Taylor

[-- Attachment #1: Type: text/plain, Size: 2202 bytes --]

On Mon, 15 Nov 2021 at 13:56, Clem Cole <clemc@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@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@gmail.com>
>> wrote:
>>
>>> On Mon, 15 Nov 2021 at 13:31, Clem Cole <clemc@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
>>>
>>

[-- Attachment #2: Type: text/html, Size: 4665 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [TUHS] [COFF] Will someone please explain the history and usage of gpasswd / newgrp / sg?
  2021-11-15 18:29 ` [TUHS] [COFF] " Clem Cole
  2021-11-15 18:46   ` Henry Bent
@ 2021-11-15 20:17   ` arnold
  2021-11-15 21:37     ` Clem Cole
  1 sibling, 1 reply; 11+ messages in thread
From: arnold @ 2021-11-15 20:17 UTC (permalink / raw)
  To: gtaylor, clemc; +Cc: tuhs, coff

Clem Cole <clemc@ccc.com> wrote:

> 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.

Not so soon, really. The new group scheme was widely released with
4.2 BSD (~ 1983). System V didn't pick up multiple groups until
System V Release 4, circa 1989.

Arnold

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [TUHS] [COFF] Will someone please explain the history and usage of gpasswd / newgrp / sg?
  2021-11-15 20:17   ` arnold
@ 2021-11-15 21:37     ` Clem Cole
  0 siblings, 0 replies; 11+ messages in thread
From: Clem Cole @ 2021-11-15 21:37 UTC (permalink / raw)
  To: arnold; +Cc: tuhs, coff, gtaylor

[-- Attachment #1: Type: text/plain, Size: 675 bytes --]

Fair enough.
ᐧ

On Mon, Nov 15, 2021 at 3:17 PM <arnold@skeeve.com> wrote:

> Clem Cole <clemc@ccc.com> wrote:
>
> > 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.
>
> Not so soon, really. The new group scheme was widely released with
> 4.2 BSD (~ 1983). System V didn't pick up multiple groups until
> System V Release 4, circa 1989.
>
> Arnold
>

[-- Attachment #2: Type: text/html, Size: 1425 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2021-11-15 21:38 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-15 16:11 [TUHS] Will someone please explain the history and usage of gpasswd / newgrp / sg? Grant Taylor via TUHS
2021-11-15 16:26 ` [TUHS] [COFF] " Arrigo Triulzi via TUHS
2021-11-15 17:51 ` [TUHS] " Jon Steinhart
2021-11-15 18:29 ` [TUHS] [COFF] " Clem Cole
2021-11-15 18:46   ` Henry Bent
2021-11-15 18:51     ` Clem Cole
2021-11-15 18:54       ` Warner Losh
2021-11-15 18:56       ` Clem Cole
2021-11-15 19:09         ` Henry Bent
2021-11-15 20:17   ` arnold
2021-11-15 21:37     ` Clem Cole

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).