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
Responsible Changed From-To: freebsd-doc->joel Take.
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
Created attachment 228037 [details] newgrp(1) patch Add an example of creating a group, setting a group password, and switching to the new group.
group(5) has a cross-reference to newgrp(1) in the SEE ALSO section.
Update patch to -current. Needs review. https://reviews.freebsd.org/D48877
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(-)
I just cleaned up Felix's patch and committed it. Hopefully I got all the attribution right.
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(-)