Re: group '545' does not exist ?

Roland Mainz via Cygwin <[email protected]>
Newsgroups gmane.os.cygwin
Message-ID <CAKAoaQntTmvE8EbKCiJMcySrhHG91a947A8WTvKkv3H6LzhsHg@mail.gmail.com>
On Wed, Dec 3, 2025 at 12:57 PM Marco Atzeri via Cygwin
<[email protected]> 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".

----

Bye,
Roland
-- 
  __ .  . __
 (o.\ \/ /.o) [email protected]
  \__\/\/__/  MPEG specialist, C&&JAVA&&Sun&&Unix programmer
  /O /==\ O\  TEL +49 641 3992797
 (;O/ \/ \O;)

-- 
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.