On 2026-03-04 23:35, Jakob Bohm via Cygwin wrote:
On 03/03/2026 10:49, Brian Inglis via Cygwin wrote:
On 2026-03-03 01:26, Aurélien Couderc via Cygwin wrote:
On Mon, Mar 2, 2026 at 8:19 PM Martin Wege via Cygwin <[email protected]> wrote:

Hello,

we use HYPER-V virtual machines on Windows 10 and Windows 11. It seems
they use a "special" kind of group called 'Virtual Machines', which
Cygwin (3.6.5) /bin/getent cannot lookup:

getent group 'Virtual Machines'
<nothing>

Does anyone have ideas or clues how to get getent group to work with
this kind of Windows group?

We want the Cygwin gid for that group, and use Cygwin commands to work
with those files...

Déjà vu

1. Please read https://cygwin.com/pipermail/cygwin/2025-July/258505.html

2. Try this:
getent group "NT VIRTUAL MACHINE+Virtual Machines"
For me, with default (empty, except comments) /etc/nsswitch.conf, it
does not work. Which I consider a bug.

The defaults are chosen so that required system components work.
If you have additional requirements, such as interactive lookup, or your own scripts, you may add to the defaults, which adds to the overhead on every lookup, reduced if you run the `cygserver` cache.

This is the default installed conf file:
<snip large config file default>

OP isn't asking about enumeration, but direct lookup.  You answer is as inept
as responding with hosts file settings when asked about why certain DNS
lookups fail.  If lookup of a system built in group fails, core cygwin tools such as /bin/ls fail.

All responses in these mailing lists are from subscribers who try to help in their spare time - disparaging comments just get posts ignored or posters killfiled!
As with emails, if responses are unhelpful, you have the same options.

Builtins are limited to those seven documented - five users - two groups - and everything else is looked up via the NS sources switch. Lookup is otherwise either done from files or configured DB sources under db_enum, so the example below disables direct user lookups completely, and settings allow access to other sources:

# Examples:
# db_enum: none
#       No output from getpwent/getgrent at all.

Try setting `db_enum: all` and see if you can access the desired entries.

If not, please attach as text a Simple Test Case, unfiltered strace output, and complete output from `cygcheck -hrsv`, as per problem reporting guidelines below.

The CYGWIN library implementation of getent functions need to be agile
enough to handle any values handled by the similar Win32 functions. This in
turn requires hardcoded logic for any values of the enum first DWORD after
the uint48_t authority field in SID values, in this case "83". Alternatively, 
grow
the uid_t type to 560 bits, which seems to be the limit of current Win32
implementations (max 15 DWORDS after the authority and version byte fixed at
1).
Patches submitted according to guidelines below will be gratefully accepted and thoughtfully considered when some interested subscriber has spare time.

--
Take care. Thanks, Brian Inglis              Calgary, Alberta, Canada

La perfection est atteinte                   Perfection is achieved
non pas lorsqu'il n'y a plus rien à ajouter  not when there is no more to add
mais lorsqu'il n'y a plus rien à retrancher  but when there is no more to cut
                                -- Antoine de Saint-Exupéry

--
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

Reply via email to