From nobody Fri Feb 27 00:57:37 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fMVKy50vRz6SwKB for ; Fri, 27 Feb 2026 00:57:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fMVKy3yB4z3mQs for ; Fri, 27 Feb 2026 00:57:42 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772153862; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=u8KwWVKkkJVzNRGvG+o7shEhcHAPLo/e+HeQO83IkBc=; b=kn4K2PR9AB9GbbqzS5H6+V4YrxLrs8h2Dcy0mGnNqSZ8gw22uyFc6xZYYL5JTOrgePhkSK GDsaXcLt5deiPVEXmYBkH/sqkBuctdIS1yaqk4ubQhqcjoRuy0ai3NEnOP4GNh9rtScwZW JHMYYQqaTWyOGVHRMjGCAJ14r6Cy2NUm7hKcmbyjK+MwolBSwZMy6dx4Nv+ifMYUM2/gAu EO32jneUzNL+AbSaWlcfAlCzznH8A+Xm2aWnDvnSrsox/AkTTkiTM3C2Wb/OnBdsxKHOO0 ag2OcxVQ3gzKLsb/srzZeWWXR6ZsiCb+H/+InMgKtrDTwafBvrBcbBVgpOKWbA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1772153862; a=rsa-sha256; cv=none; b=gpWpYok02hI8LsXiCx3VubSd3h+I7IEj2wUwIB04UHVM/qSeTQlhc1NNQvrw250exLfj7Z 0Zop9RX8rs4W+3iffuyBDoCF7/EAI9H1mrY0aPAnLHjbRi0CkxP0ln6xds+r4o2MYzXyRS v815TIj9Jb/E48pVTbTUlv2nHe91VGgmBlCIqMR0C91kwKQu0K/M3teN5xpb/uFw3xRJbW 8rePiEYMhABCXTg5jCLydsHhibLXs9qhS91mTr9DwXVCFAyOOuVj+N46sUZ19CBe405eOe x3s/NsHhYFdGCEEsN/vdbzVQPyF+IAav+YEpgyQ0LGL4ZDCUFyS1XUObY7KTNQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772153862; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=u8KwWVKkkJVzNRGvG+o7shEhcHAPLo/e+HeQO83IkBc=; b=GRSiR2gBJ0sVvBYlt5K/R13XPKDrChRwXGXgXbp8BMsGKteU1YK5NsBE42t/wUrqSIUZTK bELZRUV6Qz+KhFUgMMldt7gRUlTuZce6XqhgKJfAix/tlydvlU16ccJD0bXI2SgICUGauB DmCV49+KitzH3tGU0VgVnDv7zYmiG1qEHpcATbiEqZp57mjSlmIibO/2TZlVxllMBP9C0z kh9WGbwiyNSmq34H+jk8mMN+Vk/uSkcwOtRZYtbXSPUDINxrLKMUURjGZvVS1O/F1PbG+7 DpXuMbPMFgdilcp0AmAna5PAM+oIVSc+d1Ru1sX0n0Y/62/jUZ3eTFg4StbtLA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fMVKy3Yhczw1D for ; Fri, 27 Feb 2026 00:57:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 46367 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 27 Feb 2026 00:57:37 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Cc: Felix Johnson From: Alexander Ziaee Subject: git: 86dc5dd0b2a8 - main - newgrp.1: Provide examples List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ziaee X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 86dc5dd0b2a861cf9d8cad18fc17c17dbbfc4465 Auto-Submitted: auto-generated Date: Fri, 27 Feb 2026 00:57:37 +0000 Message-Id: <69a0ec01.46367.9c02401@gitrepo.freebsd.org> The branch main has been updated by ziaee: URL: https://cgit.FreeBSD.org/src/commit/?id=86dc5dd0b2a861cf9d8cad18fc17c17dbbfc4465 commit 86dc5dd0b2a861cf9d8cad18fc17c17dbbfc4465 Author: Felix Johnson AuthorDate: 2026-02-27 00:45:03 +0000 Commit: Alexander Ziaee 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(-) diff --git a/usr.bin/newgrp/newgrp.1 b/usr.bin/newgrp/newgrp.1 index d9701feef0d7..032aeb72616d 100644 --- a/usr.bin/newgrp/newgrp.1 +++ b/usr.bin/newgrp/newgrp.1 @@ -22,7 +22,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd February 8, 2013 +.Dd February 6, 2025 .Dt NEWGRP 1 .Os .Sh NAME @@ -67,6 +67,21 @@ exits >0. Otherwise, the exit status of .Nm is the exit status of the shell. +.Sh EXAMPLES +Create a new group, +.Ar foo , +with +.Xr pw 8 : +.Pp +.Dl pw group add foo +.Pp +Set the group password: +.Pp +.Dl pw group mod foo -h 0 +.Pp +As a non-root user, switch to the group: +.Pp +.Dl newgrp foo .Sh SEE ALSO .Xr csh 1 , .Xr groups 1 ,