DMARC-Filter: OpenDMARC Filter v1.4.2 delorie.com 5B4F0dSR668466 Authentication-Results: delorie.com; dmarc=pass (p=none dis=none) header.from=cygwin.com Authentication-Results: delorie.com; spf=pass smtp.mailfrom=cygwin.com DKIM-Filter: OpenDKIM Filter v2.11.0 delorie.com 5B4F0dSR668466 Authentication-Results: delorie.com; dkim=pass (1024-bit key, unprotected) header.d=cygwin.com header.i=@cygwin.com header.a=rsa-sha256 header.s=default header.b=MA/S22Qf X-Recipient: archive-cygwin AT delorie DOT com DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 3F74D4C3181E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com; s=default; t=1764860438; bh=klkRjU1HM597OsgX/LSdwOkNF49BFuv6wjQDSHCirjk=; h=Date:Subject:To:References:Cc:In-Reply-To:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From:Reply-To:From; b=MA/S22QfKi5pBDKsoazoez1h+RF5yODoXx1kXYvOu5+5OQg7964vpufFKchBnTM6Y KAlmZxV+6tAnillu1HaffmQuXroxaDt9XQblEipBZAqPbkcUoyo96vgOu1Sij/8Nuz gMvARdgM4gr9xYq5Lt9vXBE3BpAYfrjG7xapVpZs= X-Original-To: cygwin AT cygwin DOT com Delivered-To: cygwin AT cygwin DOT com DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 056184BB3BD0 ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 056184BB3BD0 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1764860418; cv=none; b=YSgWj0FMqJr0F8Iv3I0tuCnz+rCOYnjCSA3BiGF3FLqdB2osMHYpNGTg7LLtCyoXbzsFU5cz9g2SCYnahz1/9NcjKgeHBkz7aKDQb09i70LPh0b0xIKNW37lTrDZjXBCooXh6+YK0FimYUVxA//Qj6qs59E7RjutMbsmya7bUhU= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1764860418; c=relaxed/simple; bh=J+S0o61K0a+DYSh3n/PnUWhz/UrWns4wrHX5HWIaYm0=; h=Message-ID:Date:MIME-Version:Subject:To:From; b=JgmO6GM1DF8XynXA9Xl7W2ZfAll+Er6BhsZeNBAi0NTosNpTcpAehq4L865QVnG6DMe0YSmU+ksRdz1G/rTm0Mk/P0XRRAvV4FZZx/17dVTFF5b48kzTQwPlZRK0q0OcSOf3nmIGgSxtfe2hNi6IIt8JdShieRmSm4DYPCOqLYw= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 056184BB3BD0 X-SNCR-Rigid: 68CA1DFC07C5CEA0 X-Originating-IP: [86.139.199.212] X-OWM-Source-IP: 86.139.199.212 X-OWM-Env-Sender: jon DOT turney AT dronecode DOT org DOT uk X-RazorGate-Vade: gggruggvucftvghtrhhoucdtuddrgeefgedrtddtgdehkeejucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuueftkffvkffujffvgffngfevqffopdfqfgfvnecuuegrihhlohhuthemuceftddunecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefkffggfgfuvfhfhfevjggtgfesthekredttddvjeenucfhrhhomheplfhonhcuvfhurhhnvgihuceojhhonhdrthhurhhnvgihsegurhhonhgvtghouggvrdhorhhgrdhukheqnecuggftrfgrthhtvghrnhepudekgffftedutddtheevveeljeetgeelfefhkeekhffhtedtjeduveegveevhfetnecuffhomhgrihhnpehophgvnhhgrhhouhhprdhorhhgpdgthihgfihinhdrtghomhenucfkphepkeeirddufeelrdduleelrddvuddvnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehhvghloheplgduledvrdduieekrddurddutdelngdpihhnvghtpeekiedrudefledrudelledrvdduvddpmhgrihhlfhhrohhmpehjohhnrdhtuhhrnhgvhiesughrohhnvggtohguvgdrohhrghdruhhkpdhrvghvkffrpehhohhsthekiedqudefledqudelledqvdduvddrrhgrnhhgvgekiedqudefledrsghttggvnhhtrhgrlhhplhhushdrtghomhdprghuthhhpghushgvrhepjhhonhhtuhhrnhgvhiessghtihhnthgvrhhnvghtrdgtohhmpdhgvghokffrpefiuedpoffvtefjohhsthepsghtphhrughrghhotddtledpnhgs pghrtghpthhtohepvddprhgtphhtthhopegthihgfihinhestgihghifihhnrdgtohhmpdhrtghpthhtohepmhgrrhgtohdrrghtiigvrhhisehgmhgrihhlrdgtohhm X-RazorGate-Vade-Verdict: clean 0 X-RazorGate-Vade-Classification: clean X-VadeSecure-score: verdict=clean score=0/300, class=clean Message-ID: Date: Thu, 4 Dec 2025 15:00:14 +0000 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: group '545' does not exist ? To: Marco Atzeri References: <3a9f1d9a-d363-4617-bc24-e2b5aa4d27e9 AT gmail DOT com> <48e6fb4c-2341-4f43-b158-d70a9b391f91 AT gmail DOT com> Content-Language: en-US Cc: cygwin AT cygwin DOT com In-Reply-To: <48e6fb4c-2341-4f43-b158-d70a9b391f91@gmail.com> X-BeenThere: cygwin AT cygwin DOT com X-Mailman-Version: 2.1.30 Precedence: list List-Id: General Cygwin discussions and problem reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Jon Turney via Cygwin Reply-To: Jon Turney Content-Type: text/plain; charset="utf-8"; Format="flowed" Errors-To: cygwin-bounces~archive-cygwin=delorie DOT com AT cygwin DOT com Sender: "Cygwin" Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from base64 to 8bit by delorie.com id 5B4F0dSR668466 On 03/12/2025 15:20, Marco Atzeri via Cygwin wrote: > On 03/12/2025 13:50, Roland Mainz via Cygwin wrote: >> On Wed, Dec 3, 2025 at 12:57 PM Marco Atzeri via Cygwin >> wrote: >>> >>> I am probably missing something, but this seems bizarre (to me) >>> >>> $ id >>> uid=197608(Marco) gid=197121(NESSUNO) groups=197121(NESSUNO),114(Account >>> locale e membro del gruppo Administrators),544(Administrators),547(Power >>> Users),545(Users),4(INTERACTIVE),66049(ACCESSO CONSOLE),11(Authenticated >>> Users),15(Questa organizzazione),113(Account >>> locale),4095(CurrentSession),66048(LOCALE),262154(Autenticazione >>> NTLM),405504(Livello obbligatorio alto) >>> >>> >>> $ newgrp 545 touch prova2 >>> newgrp: group '545' does not exist >>> >>> $ uname -svr >>> CYGWIN_NT-10.0-26200 3.6.5-1.x86_64 2025-10-09 17:21 UTC >> >> Please use the group name ("Users" in your case) and not the numeric GID. >> >> If you really need to use the numeric gid, then you can use $ getent >> group 545 | awk -F ':' '{ print $1 } ' # to convert it to a group name >> (see comment below about localised Windows builtin group names), and >> then plug that into newgrp: >> $ newgrp "$(getent group 545 | awk -F ':' '{ print $1 } ')" touch >> prova2 # >> >> BTW: There is one issue with this: Windows builtin account names >> (users+groups) can be localised, e.g. English gid=545 is "Users", >> while in German it's "Benutzer". >> >> > as usual PEBCAK Actually, I think this is a shortcoming of the cygwin version of newgrp. The SUS description [1] of newgrp allows a numeric group id to be specified. (In fact, it includes the clarifying remark "If group is a non-negative numeric string and exists in the group database as a group name, the numeric group ID associated with that group name will be used as the group ID", which suggests a, um, straightforward implementation) But it seems that our implementation only currently handles a group name (See [2]). [1] https://pubs.opengroup.org/onlinepubs/7908799/xcu/newgrp.html [2] https://cygwin.com/cgit/newlib-cygwin/tree/winsup/utils/newgrp.c#n166 -- 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