Re: HYPER-V VMs: Cygwin /bin/getent group 'Virtual Machines' cannot find the group
Jakob Bohm via Cygwin <[email protected]>
| Newsgroups | gmane.os.cygwin |
|---|---|
| Organization | WiseMo A/S |
| Message-ID | <[email protected]> |
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. 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). -- Jakob Bohm, CIO, partner, WiseMo A/S. https://www.wisemo.com Transformervej 29, 2860 Soborg, Denmark. direct: +45 31 13 16 10 <tel:+4531131610> This message is only for its intended recipient, delete if misaddressed. WiseMo - Remote Service Management for PCs, Phones and Embedded -- 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