Bug 167742 - Update documentation for group 5, and newgrp 1
Summary: Update documentation for group 5, and newgrp 1
Status: Closed FIXED
Alias: None
Product: Documentation
Classification: Unclassified
Component: Manual Pages (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Alexander Ziaee
URL:
Keywords: easy
Depends on:
Blocks:
 
Reported: 2012-05-09 17:20 UTC by Mark Saad
Modified: 2026-04-10 18:32 UTC (History)
4 users (show)

See Also:


Attachments
newgrp(1) patch (670 bytes, patch)
2021-09-20 03:10 UTC, Felix Johnson
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Mark Saad 2012-05-09 17:20:11 UTC
	The man pages for both group 5 and newgrp 1 do not include examples of how to use group passwords.

Fix: 

eadler@freebsd.org stated that a short example similar to this would do in the newgrp man page

Create the group
% pw group add foo

Set the group password
% pw group mod foo -h 0

As a non root user switch to the group
% newgrp foo

Also in the group 5 man the See Also section should include a refrence to newgrp 1
How-To-Repeat: 	See man 1 newgrp and man 5 group
Comment 1 Joel Dahl freebsd_committer freebsd_triage 2013-04-20 23:44:29 UTC
Responsible Changed
From-To: freebsd-doc->joel

Take.
Comment 2 Eitan Adler freebsd_committer freebsd_triage 2017-12-31 07:58:23 UTC
For bugs matching the following criteria:

Status: In Progress Changed: (is less than) 2014-06-01

Reset to default assignee and clear in-progress tags.

Mail being skipped
Comment 3 Felix Johnson 2021-09-20 03:10:50 UTC
Created attachment 228037 [details]
newgrp(1) patch

Add an example of creating a group, setting a group password, and switching to the new group.
Comment 4 Felix Johnson 2021-09-20 03:11:58 UTC
group(5) has a cross-reference to newgrp(1) in the SEE ALSO section.
Comment 5 Felix Johnson 2025-02-06 23:28:41 UTC
Update patch to -current.
Needs review.

https://reviews.freebsd.org/D48877
Comment 6 commit-hook freebsd_committer freebsd_triage 2026-02-27 00:58:03 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/src/commit/?id=86dc5dd0b2a861cf9d8cad18fc17c17dbbfc4465

commit 86dc5dd0b2a861cf9d8cad18fc17c17dbbfc4465
Author:     Felix Johnson <fjohnson@felix-johnson.com>
AuthorDate: 2026-02-27 00:45:03 +0000
Commit:     Alexander Ziaee <ziaee@FreeBSD.org>
CommitDate: 2026-02-27 00:57:20 +0000

    newgrp.1: Provide examples

    "These examples appear to be originally noted thirteen years ago by
    Mark Saad, contributed by eadler, put into a patch by Felix Johnson,
    and made into mdoc by myself. Finally, put this bug to rest." ~ziaee

    PR:                     167742
    Co-authored-by:         eadler, ziaee, Mark Saad
    Differential Revision:  https://reviews.freebsd.org/D48877

 usr.bin/newgrp/newgrp.1 | 17 ++++++++++++++++-
 1 file changed, 16 insertions(+), 1 deletion(-)
Comment 7 Alexander Ziaee freebsd_committer freebsd_triage 2026-02-27 00:59:45 UTC
I just cleaned up Felix's patch and committed it. Hopefully I got all the attribution right.
Comment 8 commit-hook freebsd_committer freebsd_triage 2026-04-10 18:32:26 UTC
A commit in branch stable/15 references this bug:

URL: https://cgit.FreeBSD.org/src/commit/?id=67f28803e0ec3ec93cb431bb6c0b3680a91d0849

commit 67f28803e0ec3ec93cb431bb6c0b3680a91d0849
Author:     Felix Johnson <fjohnson@felix-johnson.com>
AuthorDate: 2026-02-27 00:45:03 +0000
Commit:     Alexander Ziaee <ziaee@FreeBSD.org>
CommitDate: 2026-04-10 18:28:36 +0000

    newgrp.1: Provide examples

    "These examples appear to be originally noted thirteen years ago by
    Mark Saad, contributed by eadler, put into a patch by Felix Johnson,
    and made into mdoc by myself. Finally, put this bug to rest." ~ziaee

    PR:                     167742
    Co-authored-by:         eadler, ziaee, Mark Saad
    Differential Revision:  https://reviews.freebsd.org/D48877

    (cherry picked from commit 86dc5dd0b2a861cf9d8cad18fc17c17dbbfc4465)

 usr.bin/newgrp/newgrp.1 | 17 ++++++++++++++++-
 1 file changed, 16 insertions(+), 1 deletion(-)