Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 16 Jan 2001 14:10:15 -0800
From:      Peter Wemm <peter@netplex.com.au>
To:        Will Andrews <will@physics.purdue.edu>
Cc:        Peter Pentchev <roam@orbitel.bg>, arch@FreeBSD.ORG
Subject:   Re: no newgroup/newgrp in FreeBSD? 
Message-ID:  <200101162210.f0GMAFs17644@mobile.wemm.org>
In-Reply-To: <20010116094133.B1858@puck.firepipe.net> 

next in thread | previous in thread | raw e-mail | index | archive | help
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200101162210.f0GMAFs17644>