delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2024/04/21/21:36:57

X-Recipient: archive-cygwin AT delorie DOT com
DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D5EA7385840C
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com;
s=default; t=1713749815;
bh=6vwdbyxglf79TTNcS7gWKxqUsjjfHa2WuQI19SBioWA=;
h=Date:Subject:To:References:In-Reply-To:List-Id:List-Unsubscribe:
List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:
From;
b=uHXSU/BpNprnRLCWikIpKCOHqsK8NgtdjdIU5SASKT5XF2x5zMCvtkK/mXdeg3ogl
ddHKUlXIUEdhOXNvII08CTybAzoo7gLPBgvS6caG5K0oVR/UYNCGFH0sxa0bm3Cj8J
zJ6i1RhQKY0cTg+AGHvnVn7kz7kzPTfL9eJC62CU=
X-Original-To: cygwin AT cygwin DOT com
Delivered-To: cygwin AT cygwin DOT com
DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 2414B3858D1E
ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 2414B3858D1E
ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1713749792; cv=none;
b=PNqdb/Lwxlpqumq1F8riwxjHMUT6jVtHCx6FoqNjFvG9STppBZCJPwvXsJTJgjqTpNNKwZh49zg5BftyheCyRh7+MI8+ByJ1vHD+gJdAz1PQrXbFYWXOV0JnWnjT/u0v7kQAkxbztAuhiFQLZcsFTudzfpgUtKD2B2XbC0ZczBc=
ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key;
t=1713749792; c=relaxed/simple;
bh=AjBSV0aMU0dXlzwvsmNc5OerPEb8rQDJOnRhfhbi090=;
h=DKIM-Signature:Message-ID:Date:MIME-Version:Subject:To:From;
b=CbFIc/JRJ9ZcJ0NY3pmwihEVfh0QxXLaNTUmqdW05Jl4MwmyDV9ziGtcdBpXoKhc0rdPv6d633madRQxkUXjFCBgaLHQRI3fNUknNKeC1FCzbDfiAsxubXACn0K2ZGO9O2CuZLpQmu8CCHqGYMvRXgn6+vn/M7ajuYfBcXjDvqU=
ARC-Authentication-Results: i=1; server2.sourceware.org
X-ASG-Debug-ID: 1713749704-24039d23e95ed970001-w5GHUG
X-Barracuda-Envelope-From: moss AT cs DOT umass DOT edu
X-Barracuda-RBL-Trusted-Forwarder: 128.119.240.136
X-Barracuda-RBL-Trusted-Forwarder: 192.168.50.223
Message-ID: <c772b67d-be50-5b75-1b2b-99d9f1c5a717@cs.umass.edu>
Date: Sun, 21 Apr 2024 21:35:04 -0400
MIME-Version: 1.0
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.15.1
Subject: Re: /usr/bin/sg in Cygwin?
X-ASG-Orig-Subj: Re: /usr/bin/sg in Cygwin?
To: Dan Shelton <dan DOT f DOT shelton AT gmail DOT com>, cygwin AT cygwin DOT com
References: <CAAvCNcBw0z3EJnjvs4hooW7cmgRvCA=-ofMywYZM3+f9OcJEFQ AT mail DOT gmail DOT com>
<CAAvCNcDch6VYDYR3ocwUdko8m0CUtMCM-OLRqmDDn-8hCQYySg AT mail DOT gmail DOT com>
<b7ee5e6a-f351-4293-861a-9c4b59ef69dd AT SystematicSW DOT ab DOT ca>
<CAAvCNcB_vuStJjnd+GohVM-y=AHZBUP=Gi5A+AAgnddP3wDdQQ AT mail DOT gmail DOT com>
In-Reply-To: <CAAvCNcB_vuStJjnd+GohVM-y=AHZBUP=Gi5A+AAgnddP3wDdQQ@mail.gmail.com>
X-Barracuda-Connect: mailsrv.cs.umass.edu[128.119.240.136]
X-Barracuda-Start-Time: 1713749704
X-Barracuda-Encrypted: ECDHE-RSA-AES128-GCM-SHA256
X-Barracuda-URL: https://barramail.cs.umass.edu:443/cgi-mod/mark.cgi
X-Barracuda-BRTS-Status: 1
X-Virus-Scanned: by bsmtpd at cs.umass.edu
X-Barracuda-Scan-Msg-Size: 1795
X-Barracuda-Spam-Score: 0.00
X-Barracuda-Spam-Status: No, SCORE=0.00 using global scores of TAG_LEVEL=1000.0
QUARANTINE_LEVEL=1000.0 KILL_LEVEL=9.7 tests=
X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.3.123834
Rule breakdown below
pts rule name description
---- ---------------------- --------------------------------------------------
X-Spam-Status: No, score=-3.2 required=5.0 tests=BAYES_00, DKIM_SIGNED,
DKIM_VALID, DKIM_VALID_AU, JMQ_SPF_NEUTRAL, NICE_REPLY_A, SPF_HELO_NONE,
SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on
server2.sourceware.org
X-BeenThere: cygwin AT cygwin DOT com
X-Mailman-Version: 2.1.30
List-Id: General Cygwin discussions and problem reports <cygwin.cygwin.com>
List-Archive: <https://cygwin.com/pipermail/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-request AT cygwin DOT com?subject=help>
List-Subscribe: <https://cygwin.com/mailman/listinfo/cygwin>,
<mailto:cygwin-request AT cygwin DOT com?subject=subscribe>
From: Eliot Moss via Cygwin <cygwin AT cygwin DOT com>
Reply-To: Eliot Moss <moss AT cs DOT umass DOT edu>
Sender: "Cygwin" <cygwin-bounces+archive-cygwin=delorie DOT com AT cygwin DOT com>

On 4/21/2024 7:20 PM, Dan Shelton via Cygwin wrote:
> On Sat, 20 Apr 2024 at 07:39, Brian Inglis via Cygwin <cygwin AT cygwin DOT com> wrote:
>>
>> On 2024-04-19 17:47, Dan Shelton via Cygwin wrote:
>>> On Fri, 23 Feb 2024 at 22:25, Dan Shelton wrote:
>>>> Is there a package which provides /usr/bin/sg (execute shell commands
>>>> in a different group)?
>>
>> The POSIX standard command is newgrp - install cygwin-doc to see Cygwin (and
>> newlib libc) man pages (and info, html, PDF docs), man-pages-posix to see POSIX
>> man pages, and man-pages-linux if you want to see recent Linux release man pages.
>>
>> To see possibly relevant commands, run:
>>
>> $ apropos -s 1,1p group
>> chgrp (1)            - change group ownership
>> chgrp (1p)           - change the file group ownership
>> chown (1)            - change file owner and group
>> g3topbm (1)          - convert a Group 3 fax file into a PBM image
>> groups (1)           - print the groups a user is in
>> id (1)               - print real and effective user and group IDs
>> make (1)             - GNU Make utility to maintain groups of programs
>> make (1p)            - maintain, update, and regenerate groups of programs
>> mkgroup (1)          - Write /etc/group-like output to stdout
>> newgrp (1)           - change primary group for a command
>> newgrp (1p)          - change to a new group
>> pbmtog3 (1)          - convert a PBM image into a Group 3 MH fax file
> 
> newgrp(1) is USELESS. It only opens an interactive shell, but does not
> allow the user to execute a non-interactive script with the requested
> group like bash -c does.

??

The man pages has:

  newgrp [-] [group] [command [args...]]

which implies to me that you can give a command.

Did that not work for you?  EM

-- 
Problem reports:      https://cygwin.com/problems.html
FAQ:                  https://cygwin.com/faq/
Documentation:        https://cygwin.com/docs.html
Unsubscribe info:     https://cygwin.com/ml/#unsubscribe-simple

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019