public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* BUG: Cygwin getent group refuses to list group added with net localgroup mygrp1 /add
@ 2024-02-20  4:13 Dan Shelton
  2024-02-20  9:57 ` Corinna Vinschen
  0 siblings, 1 reply; 7+ messages in thread
From: Dan Shelton @ 2024-02-20  4:13 UTC (permalink / raw)
  To: cygwin

Hello!

I think I found a rather nasty bug:
1. Add a new group with "net localgroup mygrp1 /add"
2. Then list all groups with "getent group", the new group mygrp1 will
not show up. "getent group mygrp1" will list it, but this is useless
in my case, as I need the group listed by "getent group"

Dan
-- 
Dan Shelton - Cluster Specialist Win/Lin/Bsd

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: BUG: Cygwin getent group refuses to list group added with net localgroup mygrp1 /add
  2024-02-20  4:13 BUG: Cygwin getent group refuses to list group added with net localgroup mygrp1 /add Dan Shelton
@ 2024-02-20  9:57 ` Corinna Vinschen
  2024-02-20 16:24   ` Dan Shelton
  0 siblings, 1 reply; 7+ messages in thread
From: Corinna Vinschen @ 2024-02-20  9:57 UTC (permalink / raw)
  To: cygwin

On Feb 20 05:13, Dan Shelton via Cygwin wrote:
> Hello!
> 
> I think I found a rather nasty bug:
> 1. Add a new group with "net localgroup mygrp1 /add"
> 2. Then list all groups with "getent group", the new group mygrp1 will
> not show up. "getent group mygrp1" will list it, but this is useless
> in my case, as I need the group listed by "getent group"

I guess we can rule out a domain controller but is this a standalone
machine or a domain member machine?

What's the setting of your /etc/nsswitch.conf?


Thanks,
Corinna

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: BUG: Cygwin getent group refuses to list group added with net localgroup mygrp1 /add
  2024-02-20  9:57 ` Corinna Vinschen
@ 2024-02-20 16:24   ` Dan Shelton
  2024-02-20 20:45     ` Corinna Vinschen
  0 siblings, 1 reply; 7+ messages in thread
From: Dan Shelton @ 2024-02-20 16:24 UTC (permalink / raw)
  To: cygwin

On Tue, 20 Feb 2024 at 10:57, Corinna Vinschen via Cygwin
<cygwin@cygwin.com> wrote:
>
> On Feb 20 05:13, Dan Shelton via Cygwin wrote:
> > Hello!
> >
> > I think I found a rather nasty bug:
> > 1. Add a new group with "net localgroup mygrp1 /add"
> > 2. Then list all groups with "getent group", the new group mygrp1 will
> > not show up. "getent group mygrp1" will list it, but this is useless
> > in my case, as I need the group listed by "getent group"
>
> I guess we can rule out a domain controller but is this a standalone
> machine or a domain member machine?

Standalone test machine, stock Windows 10 installed 2 days ago,
current patches, Cygwin 3.5 from 2 days ago.

>
> What's the setting of your /etc/nsswitch.conf?

Only comments in that file, i.e. empty

Dan
-- 
Dan Shelton - Cluster Specialist Win/Lin/Bsd

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: BUG: Cygwin getent group refuses to list group added with net localgroup mygrp1 /add
  2024-02-20 16:24   ` Dan Shelton
@ 2024-02-20 20:45     ` Corinna Vinschen
  2024-02-23  8:10       ` Dan Shelton
  2024-02-27  3:08       ` Dan Shelton
  0 siblings, 2 replies; 7+ messages in thread
From: Corinna Vinschen @ 2024-02-20 20:45 UTC (permalink / raw)
  To: cygwin

On Feb 20 17:24, Dan Shelton via Cygwin wrote:
> On Tue, 20 Feb 2024 at 10:57, Corinna Vinschen via Cygwin
> <cygwin@cygwin.com> wrote:
> >
> > On Feb 20 05:13, Dan Shelton via Cygwin wrote:
> > > Hello!
> > >
> > > I think I found a rather nasty bug:
> > > 1. Add a new group with "net localgroup mygrp1 /add"
> > > 2. Then list all groups with "getent group", the new group mygrp1 will
> > > not show up. "getent group mygrp1" will list it, but this is useless
> > > in my case, as I need the group listed by "getent group"
> >
> > I guess we can rule out a domain controller but is this a standalone
> > machine or a domain member machine?
> 
> Standalone test machine, stock Windows 10 installed 2 days ago,
> current patches, Cygwin 3.5 from 2 days ago.
> 
> >
> > What's the setting of your /etc/nsswitch.conf?
> 
> Only comments in that file, i.e. empty

Please set the db_enum: line to

  db_enum: all

and try again after exiting from the shell window.  Have a look at
https://cygwin.com/cygwin-ug-net/ntsec.html#ntsec-mapping-nsswitch
for the settings.  By default account enumeration only returns
the bare minimum for speed.

Btw, there *is* a bug in that code, but it affects only domain
menber machines, afaics.


Corinna

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: BUG: Cygwin getent group refuses to list group added with net localgroup mygrp1 /add
  2024-02-20 20:45     ` Corinna Vinschen
@ 2024-02-23  8:10       ` Dan Shelton
  2024-02-23  9:07         ` Corinna Vinschen
  2024-02-27  3:08       ` Dan Shelton
  1 sibling, 1 reply; 7+ messages in thread
From: Dan Shelton @ 2024-02-23  8:10 UTC (permalink / raw)
  To: cygwin; +Cc: Corinna Vinschen

On Tue, 20 Feb 2024 at 21:45, Corinna Vinschen via Cygwin
<cygwin@cygwin.com> wrote:
>
> On Feb 20 17:24, Dan Shelton via Cygwin wrote:
> > On Tue, 20 Feb 2024 at 10:57, Corinna Vinschen via Cygwin
> > <cygwin@cygwin.com> wrote:
> > >
> > > On Feb 20 05:13, Dan Shelton via Cygwin wrote:
> > > > Hello!
> > > >
> > > > I think I found a rather nasty bug:
> > > > 1. Add a new group with "net localgroup mygrp1 /add"
> > > > 2. Then list all groups with "getent group", the new group mygrp1 will
> > > > not show up. "getent group mygrp1" will list it, but this is useless
> > > > in my case, as I need the group listed by "getent group"
> > >
> > > I guess we can rule out a domain controller but is this a standalone
> > > machine or a domain member machine?
> >
> > Standalone test machine, stock Windows 10 installed 2 days ago,
> > current patches, Cygwin 3.5 from 2 days ago.
> >
> > >
> > > What's the setting of your /etc/nsswitch.conf?
> >
> > Only comments in that file, i.e. empty
>
> Please set the db_enum: line to
>
>   db_enum: all
>
> and try again after exiting from the shell window.  Have a look at
> https://cygwin.com/cygwin-ug-net/ntsec.html#ntsec-mapping-nsswitch
> for the settings.  By default account enumeration only returns
> the bare minimum for speed.
>
> Btw, there *is* a bug in that code, but it affects only domain
> menber machines, afaics.

I saw you did a couple of commits related to "getent group". Is any of
these commits fixing the problem that a new Win32 local group created
with "net localgroup mygrp1 /add"  does not show up in the output of
"getent group"?

Dan
-- 
Dan Shelton - Cluster Specialist Win/Lin/Bsd

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: BUG: Cygwin getent group refuses to list group added with net localgroup mygrp1 /add
  2024-02-23  8:10       ` Dan Shelton
@ 2024-02-23  9:07         ` Corinna Vinschen
  0 siblings, 0 replies; 7+ messages in thread
From: Corinna Vinschen @ 2024-02-23  9:07 UTC (permalink / raw)
  To: cygwin

On Feb 23 09:10, Dan Shelton via Cygwin wrote:
> On Tue, 20 Feb 2024 at 21:45, Corinna Vinschen via Cygwin
> <cygwin@cygwin.com> wrote:
> >
> > On Feb 20 17:24, Dan Shelton via Cygwin wrote:
> > > On Tue, 20 Feb 2024 at 10:57, Corinna Vinschen via Cygwin
> > > <cygwin@cygwin.com> wrote:
> > > >
> > > > On Feb 20 05:13, Dan Shelton via Cygwin wrote:
> > > > > Hello!
> > > > >
> > > > > I think I found a rather nasty bug:
> > > > > 1. Add a new group with "net localgroup mygrp1 /add"
> > > > > 2. Then list all groups with "getent group", the new group mygrp1 will
> > > > > not show up. "getent group mygrp1" will list it, but this is useless
> > > > > in my case, as I need the group listed by "getent group"
> > > >
> > > > I guess we can rule out a domain controller but is this a standalone
> > > > machine or a domain member machine?
> > >
> > > Standalone test machine, stock Windows 10 installed 2 days ago,
> > > current patches, Cygwin 3.5 from 2 days ago.
> > >
> > > >
> > > > What's the setting of your /etc/nsswitch.conf?
> > >
> > > Only comments in that file, i.e. empty
> >
> > Please set the db_enum: line to
> >
> >   db_enum: all
> >
> > and try again after exiting from the shell window.  Have a look at
> > https://cygwin.com/cygwin-ug-net/ntsec.html#ntsec-mapping-nsswitch
> > for the settings.  By default account enumeration only returns
> > the bare minimum for speed.
> >
> > Btw, there *is* a bug in that code, but it affects only domain
> > menber machines, afaics.
> 
> I saw you did a couple of commits related to "getent group". Is any of
> these commits fixing the problem that a new Win32 local group created
> with "net localgroup mygrp1 /add"  does not show up in the output of
> "getent group"?

Did you read my previous reply and tried what I wrote?


Corinna

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: BUG: Cygwin getent group refuses to list group added with net localgroup mygrp1 /add
  2024-02-20 20:45     ` Corinna Vinschen
  2024-02-23  8:10       ` Dan Shelton
@ 2024-02-27  3:08       ` Dan Shelton
  1 sibling, 0 replies; 7+ messages in thread
From: Dan Shelton @ 2024-02-27  3:08 UTC (permalink / raw)
  To: cygwin

On Tue, 20 Feb 2024 at 21:45, Corinna Vinschen via Cygwin
<cygwin@cygwin.com> wrote:
>
> On Feb 20 17:24, Dan Shelton via Cygwin wrote:
> > On Tue, 20 Feb 2024 at 10:57, Corinna Vinschen via Cygwin
> > <cygwin@cygwin.com> wrote:
> > >
> > > On Feb 20 05:13, Dan Shelton via Cygwin wrote:
> > > > Hello!
> > > >
> > > > I think I found a rather nasty bug:
> > > > 1. Add a new group with "net localgroup mygrp1 /add"
> > > > 2. Then list all groups with "getent group", the new group mygrp1 will
> > > > not show up. "getent group mygrp1" will list it, but this is useless
> > > > in my case, as I need the group listed by "getent group"
> > >
> > > I guess we can rule out a domain controller but is this a standalone
> > > machine or a domain member machine?
> >
> > Standalone test machine, stock Windows 10 installed 2 days ago,
> > current patches, Cygwin 3.5 from 2 days ago.
> >
> > >
> > > What's the setting of your /etc/nsswitch.conf?
> >
> > Only comments in that file, i.e. empty
>
> Please set the db_enum: line to
>
>   db_enum: all
>
> and try again after exiting from the shell window.

That worked on the customers machine:

getent group | fgrep 'S-1-5-21-'
Kein:S-1-5-21-3286904461-661230000-4220857270-513:197121:
mygrp1:S-1-5-21-3286904461-661230000-4220857270-1003:197611:
mygrp2:S-1-5-21-3286904461-661230000-4220857270-1004:197612:
mygrp3:S-1-5-21-3286904461-661230000-4220857270-1005:197613:
__vmware__:S-1-5-21-3286904461-661230000-4220857270-1002:197610:
Kein:S-1-5-21-3286904461-661230000-4220857270-513:197121:

but "db_enum: cache builtin local" in nsswitch.conf works too. "cache
builtin" is the default, so just add "local"

Why is "local" NOT enabled by default?

> Have a look at
> https://cygwin.com/cygwin-ug-net/ntsec.html#ntsec-mapping-nsswitch
> for the settings.  By default account enumeration only returns
> the bare minimum for speed.

It would suffice to turn change the default to "db_enum: cache builtin
local" for 3.5.1

Dan
-- 
Dan Shelton - Cluster Specialist Win/Lin/Bsd

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2024-02-27  3:08 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-20  4:13 BUG: Cygwin getent group refuses to list group added with net localgroup mygrp1 /add Dan Shelton
2024-02-20  9:57 ` Corinna Vinschen
2024-02-20 16:24   ` Dan Shelton
2024-02-20 20:45     ` Corinna Vinschen
2024-02-23  8:10       ` Dan Shelton
2024-02-23  9:07         ` Corinna Vinschen
2024-02-27  3:08       ` Dan Shelton

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).