delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2024/04/26/05:06:11

X-Recipient: archive-cygwin AT delorie DOT com
DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 3134E3849AC4
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com;
s=default; t=1714122369;
bh=m5jf+7ldTY2CUF5htvqo8fKsqjnQC3S6v8xNPnxmtEk=;
h=Date:To:Subject:In-Reply-To:References:List-Id:List-Unsubscribe:
List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc:
From;
b=Zui2E4ryHWjwzXcyo8WWRHjD/9NxrqbfjX5vlaVKGixi5xwBmra3woQdplCbeLKKp
s7al1a0i8G3+CEoi07/HxCPSKoi8+Sh5QP76bQOXneZ0xTebhUyrYm9BXZc9zfrCAl
6tdwQi6Qfz89YwNBfdhkXgN8Y7uzkF5oSpSQ1gJ4=
X-Original-To: cygwin AT cygwin DOT com
Delivered-To: cygwin AT cygwin DOT com
DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 2D1CC3858C50
ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 2D1CC3858C50
ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1714122313; cv=none;
b=N3L1rO0Hi0XPJvTilwav/0bO6YNhZFz/oLANE19YvAx+OugBajHWPGJXEU5Rf77UYnpkkJJitD5bCyveIpGrZCDZJ96TPR5UGUl30PeB9AbZBZ7cIULgyNtg7NBSJUo16GrJDVWL21xLH40bYREHoKMDBWuBUMYuu9I+kwmoksM=
ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key;
t=1714122313; c=relaxed/simple;
bh=BW7itYbHwZ2isRnLa3KnYfuiUyCsNFh2ppDJarFOUW0=;
h=DKIM-Signature:Date:From:Message-ID:To:Subject:MIME-Version;
b=ih8Dh8cXVG+L3Itcpkx+P4F5ztj3TV6hSYnY87FTxWZdDUOxWRdCCvlILmnHCYW0N0NnSSiMGN+LN9XbK0iyXp7V2azy9Its2WfTUHY0cmnlN+PZ59Vb2uWd1Rpf26DlViy5YZsIhkFhRuLgQ/ax1MXVrGp1sgkSr7liZjvtKVg=
ARC-Authentication-Results: i=1; server2.sourceware.org
X-Yandex-Fwd: 1
Date: Fri, 26 Apr 2024 12:04:06 +0300
X-Mailer: The Bat! (v9.3.4) Professional
Message-ID: <1509925074.20240426120406@yandex.ru>
To: Dan Shelton <dan DOT f DOT shelton AT gmail DOT com>, cygwin AT cygwin DOT com
Subject: Re: Switching groups with newgrp - how to get the new group with
|GetTokenInformation()| ?
In-Reply-To: <CAAvCNcDrVDLETrCTTH6EPEx_bs=Ao8kC5rev1-Xs8Qn1CWbvdQ@mail.gmail.com>
References: <CAKAoaQnFxij4Np-jg+bOLEpiSziCfamFrJ2FR_JeO+Sv_Td2Kg AT mail DOT gmail DOT com>
<ZdecXZNUgQ3i0hYN AT calimero DOT vinschen DOT de>
<CAKAoaQ=rCwVHnHAqfd5C3kC45GPE4ZHbbgCWrdM64sojLMuMyA AT mail DOT gmail DOT com>
<Zdi-CnGX3CwWA0nl AT calimero DOT vinschen DOT de>
<CAKAoaQ=kLW3houqanjcN9Qk1++BtgW-dNRiXjLYwCRTYEzoN=w AT mail DOT gmail DOT com>
<CAAvCNcCHAVooYX2_tUHHnUYvWRKHWhBwxmKws7AcqjOo-sQd+g AT mail DOT gmail DOT com>
<Zdnq5yJha75NTpgd AT calimero DOT vinschen DOT de>
<CAAvCNcAEAr0gFdR_excafHq8+cYjDvf_APb1So-AAWGSu2+zTQ AT mail DOT gmail DOT com>
<ZehpEr18QUP6C3Ge AT calimero DOT vinschen DOT de>
<CAAvCNcCcfO9br8avaNo6tg-FLHef4aH9P8AVyr95bs9ArTTSJQ AT mail DOT gmail DOT com>
<Ze83202vozq9T8Jj AT calimero DOT vinschen DOT de>
<CAAvCNcDrVDLETrCTTH6EPEx_bs=Ao8kC5rev1-Xs8Qn1CWbvdQ AT mail DOT gmail DOT com>
MIME-Version: 1.0
X-Spam-Status: No, score=-0.9 required=5.0 tests=BAYES_00, DKIM_SIGNED,
DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, KAM_THEBAT,
NICE_REPLY_A, RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_PASS,
TXREP, XM_LIGHT_HEAVY autolearn=no autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on
server2.sourceware.org
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: Andrey Repin via Cygwin <cygwin AT cygwin DOT com>
Reply-To: cygwin AT cygwin DOT com
Cc: Andrey Repin <anrdaemon AT yandex DOT ru>
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>

Greetings, Dan Shelton!

>> Then just change /etc/nsswitch.conf to enumerate "local" as well
>> and be done with it.

> That file is read-only for some customer installations, and we are not
> allowed to touch it.

Then tell the system administrator to touch it.

>>
>> You can even go so far as to use the Windows enumerator, i.e.,
>>
>>   $ net localgroup
>>
>> and than script it to use its output as input to getent group
>> for only the groups you really need info for.

> net localgroup changes layout and messages per system locale. That
> might be nice to watch as a human user, but impossible to write a
> parser. That damn thing does not honor LC_ALL, and I am now basically
> forced to write custom parsers for each customers language.

Try `chcp 65001` before calling to it. It may behave better then.


-- 
With best regards,
Andrey Repin
Friday, April 26, 2024 12:02:05

Sorry for my terrible english...


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