delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2026/03/03/04:50:26

DMARC-Filter: OpenDMARC Filter v1.4.2 delorie.com 6239oPVB584009
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 6239oPVB584009
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=NceIbtCo
X-Recipient: archive-cygwin AT delorie DOT com
DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 7A1EC4BAD168
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com;
s=default; t=1772531423;
bh=aTSs7C/KW4kV57YRksjkZXkRgY0gIzGCtRcnzu9niEA=;
h=Date:Subject:References:To:In-Reply-To:List-Id:List-Unsubscribe:
List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc:
From;
b=NceIbtCoEeId3m2hwM4wraVUnZL3hcglR5DF9WpDkMcXQ832Ea9BVu1FycKtZlDE6
Bqzm1DLxVM6/GbgI102dk+KkcIeJ4K4LK2GthBeZD31G2cf6kcxhP8motko8Zu+EyL
jw3djEqNkwwqrjoFKmqw2Xjig96MDDI19S2fDjhQ=
X-Original-To: cygwin AT cygwin DOT com
Delivered-To: cygwin AT cygwin DOT com
DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org C52234BAD16C
ARC-Filter: OpenARC Filter v1.0.0 sourceware.org C52234BAD16C
ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1772531369; cv=none;
b=sLY0b9EX9XnM0NAmnZUqhIB56+pwfT/Gtj2ZqelA6Zqz0X8Sm5SbdlLozGDaBbrVi567NVw7IuqSlZeLA2YxFDdXAdfnmZN/Na7fiA8F2TrmWvNkiNRL4T+S7eQ/pdfdqjtcKfmhadwVjZ3inTqnk3zBi0uaSiRS4E2OfExi2Hk=
ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key;
t=1772531369; c=relaxed/simple;
bh=LSyfsCthm/OY2QA6m99etl+bEaUJPQ93Ya5Y7Ui4ZOM=;
h=Message-ID:Date:MIME-Version:From:Subject:To:DKIM-Signature;
b=Iq1H72rq+IB8WU8Bf+O3+ZnurDxeu7pyRZiP99K7tZm/e1duuWZ4mD9T0mgXzcpfiD02zY9N1ZZP0mpcRmpYsYwY327/CkuBX4oJpBqud4j1+41AZamYnDU9rOWnGGj1sn1xVNKb8UKujPutPDpJBe729WpiggrH6Zs8vEMzz+Q=
ARC-Authentication-Results: i=1; server2.sourceware.org
DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org C52234BAD16C
Message-ID: <be10d1b2-234f-4980-a74d-2845220491bd@SystematicSW.ab.ca>
Date: Tue, 3 Mar 2026 02:49:26 -0700
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Subject: Re: HYPER-V VMs: Cygwin /bin/getent group 'Virtual Machines' cannot
find the group
References: <CANH4o6P07DG5XcSooXkAE5ShWkkz1hVBSMn6k2iaLycSEEA_0A AT mail DOT gmail DOT com>
<CA+1jF5oHw71rv-OH893R+DdNpnRUQAtp=WS_fXvxe1WBsC0H6w AT mail DOT gmail DOT com>
Organization: Systematic Software
To: General Cygwin discussions and problem reports <cygwin AT cygwin DOT com>
In-Reply-To: <CA+1jF5oHw71rv-OH893R+DdNpnRUQAtp=WS_fXvxe1WBsC0H6w@mail.gmail.com>
X-Rspamd-Server: rspamout07
X-Rspamd-Queue-Id: DE9F62002A
X-Stat-Signature: oyub31c418s8ruzi34dkzyfteqm3u17d
X-Session-Marker: 427269616E2E496E676C69734053797374656D6174696353572E61622E6361
X-Session-ID: U2FsdGVkX18w8tzsBMVQ3Fx1FguOjyd7pVyFSWMUJ5M=
X-HE-Tag: 1772531367-194886
X-HE-Meta: U2FsdGVkX1/8i6GNlZt7paJ9mvuJ4FQyHLr/4IHxPIedaAOEpnBa5qC8UMwfChebG/Ubx9qwA4m4XdFXF//72MalAmU4/4Q//0pq0VJ+sRrYOL6gLuxcm2usbIkDQSnAdABYCMJKVLGFZZLKGAiVwnsbuxDKLQHNK2DniDH4i5X3q/e7cRajj9I5cffnaszSep1MDyCflytcsPUPVFJtS5PHO/5T4nUN4RYwgDs/bLFLlpTjUlrndU6boiVy+p/QvAOUXJLXG1sr7SSp5ze2/b3x5ey6ftyVHYlxe8TtgBLIB0gLYtS7t4nAKqvjhaPyIjjzdYsZO+OVyozP2JPmFSohRkZgTN1P7WXfqAmM3DhexN3JX3Z4avvBhPNnBc6brLrle2YToakdfqTwP0Li9pyZMZStvGaMY4wPdOar5sdw7mrXpcelpk04kA0CL2EsHPB6QmCRnjm+c2hvMm1j++aPRDX1jMBQC90tPBplFj3t4s1bzXso3a70sS4xtiPu0RFv+sJ2tug=
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-Unsubscribe: <https://cygwin.com/mailman/options/cygwin>,
<mailto:cygwin-request AT cygwin DOT com?subject=unsubscribe>
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: Brian Inglis via Cygwin <cygwin AT cygwin DOT com>
Reply-To: General Cygwin discussions and problem reports <cygwin AT cygwin DOT com>
Cc: Brian Inglis <Brian DOT Inglis AT SystematicSW DOT ab DOT ca>
Errors-To: cygwin-bounces~archive-cygwin=delorie DOT com AT cygwin DOT com
Sender: "Cygwin" <cygwin-bounces~archive-cygwin=delorie DOT com AT cygwin DOT com>
X-MIME-Autoconverted: from base64 to 8bit by delorie.com id 6239oPVB584009

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 <cygwin AT cygwin DOT com> 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:

# /etc/nsswitch.conf
#
#    This file is read once by the first process in a Cygwin process tree.
#    To pick up changes, restart all Cygwin processes.  For a description
#    see https://cygwin.com/cygwin-ug-net/ntsec.html#ntsec-mapping-nsswitch
#
# Defaults:
# passwd:   files db
# group:    files db
# db_enum:  cache builtin
# db_home:  /home/%U
# db_shell: /bin/bash
# db_gecos: <empty>

to which I have added in my own copy all `local` SAM accounts on a non-domain 
system, to which you may wish to add `primary`, or `all` to be sure:

# db_enum:  cache builtin
db_enum:    cache local builtin
# db_enum - getpwent or getgrent database search depth
# db_enum: source1 source2 ...
# Sources:
# none  No output from getpwent/getgrent at all.
# all   The opposite. Enumerates accounts from all known sources,
#       including all trusted domains.
# cache Enumerate all accounts currently cached in memory.
# builtin
#       Enumerate the predefined builtin accounts for backward compatibility.
#       These are five passwd accounts (SYSTEM, LocalService, NetworkService,
#       Administrators, TrustedInstaller)
#       and two group accounts (SYSTEM and TrustedInstaller).
# files Enumerate the accounts from /etc/passwd or /etc/group.
# local Enumerate all accounts from the local SAM.
# primary
#       Enumerate all accounts from the primary domain.
# alltrusted
#       Enumerate all accounts from all trusted domains.
# some.domain
#       Enumerate all accounts from the trusted domain some.domain.
# Examples:
# db_enum: none
#       No output from getpwent/getgrent at all.
# db_enum: cache files
#       Enumerate all accounts cached by the current process,
#       plus all entries from either the /etc/passwd or /etc/group file.
# db_enum: cache local primary
#       Enumerate all accounts cached by the current process,
#       all accounts from the SAM of the local machine,
#       and all accounts from the primary domain of the machine.
# db_enum: local primary alltrusted
#       Enumerate the accounts from the machine's SAM,
#       from the primary domain of the machine, and from all trusted domains.
# db_enum: primary domain1.corp sub.domain.corp domain2.net
#       Enumerate the accounts from the primary domain and from the domains
#       domain1.corp, sub.domain.corp and domain2.net.
# db_enum: all
#       Enumerate everything and the kitchen sink.

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

- Raw text -


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