From owner-freebsd-arch Tue Jan 16 14:10:47 2001 Delivered-To: freebsd-arch@freebsd.org Received: from mobile.wemm.org (c1315225-a.plstn1.sfba.home.com [65.0.135.147]) by hub.freebsd.org (Postfix) with ESMTP id B673B37B69C for ; Tue, 16 Jan 2001 14:10:24 -0800 (PST) Received: from netplex.com.au (localhost [127.0.0.1]) by mobile.wemm.org (8.11.1/8.11.1) with ESMTP id f0GMAFs17644; Tue, 16 Jan 2001 14:10:15 -0800 (PST) (envelope-from peter@netplex.com.au) Message-Id: <200101162210.f0GMAFs17644@mobile.wemm.org> X-Mailer: exmh version 2.2 06/23/2000 with nmh-1.0.4 To: Will Andrews Cc: Peter Pentchev , arch@FreeBSD.ORG Subject: Re: no newgroup/newgrp in FreeBSD? In-Reply-To: <20010116094133.B1858@puck.firepipe.net> Date: Tue, 16 Jan 2001 14:10:15 -0800 From: Peter Wemm Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Will Andrews wrote: > On Tue, Jan 16, 2001 at 04:22:19PM +0200, Peter Pentchev wrote: > > http://ringwraith.online.bg/~roam/devel/sysutils/newgrp-1.0.tar.gz > [..] > > Sorry for being ignorant, but what's the difference between this and the > pw(8) group operations? > > --=20 > wca No, newgrp/newgroup is like su, but for systems with one gid only. It is setuid-root and sometimes also called sg(1). Suppose you are listed in /etc/ passwd as having a primary group of "foo" and you are also listed in /etc/ group as a member of 'bar'... You could then do a 'newgrp bar' and you would get a new shell that had a gid of 'bar' rather than 'foo'. This functionality does not have any place in FreeBSD as "all groups in the groups vector are equal". We could simply provide a non-setuid wrapper for running a new command with no changes... That would be compliant with the interface.. Cheers, -Peter -- Peter Wemm - peter@FreeBSD.org; peter@yahoo-inc.com; peter@netplex.com.au "All of this is for nothing if we don't go to the stars" - JMS/B5 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message