Karel Zak wrote:
On Thu, May 01, 2008 at 05:47:27PM -0400, Keith Hanlan wrote:
I've long wished for a version of newgrp that accepted the "-c <command>"
option in the same manner as "su".
Perhaps I'm missing some security implication here but I've always been
puzzled by the absence of this seemingly obvious facility.
Do you really need to use newgrp(1) from util-linux?
The implementation from shadow-utils supports "sg" alias and the
option "-c".
sg <groupname> -c <command>
Thank you Karel. I've been missing that utility for years. I have to
question why it's a separate utility though. It seems to me that the
additional functionality would make a natural extension to newgrp. I
also don't understand why newgrp is not part of core-utils, especially
given that "su" is. It seems a shame to restrict sg to Linux. Adding to
the confusion, I've just noticed that shadow-utils includes its own
newgrp command and sg is simply a link to newgrp. In other words, do you
really need to include newgrp with util-linux? Perhaps you could simply
deprecate it and the distributions could start picking up the more
capable version via shaadow-utils.
For my application, I need a solution for Solaris and Linux; now I have
to figure out what it will take to port sg to Solaris.
Thank you,
Keith
--
Keith Hanlan CDMA/LTE SDE ESN 393-5645
keithh@xxxxxxxxxx NORTEL Ottawa, Canada 1-613-763-5645
--
To unsubscribe from this list: send the line "unsubscribe util-linux-ng" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html