delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2023/09/22/08:07:41

X-Recipient: archive-cygwin AT delorie DOT com
DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org C5E7F3857727
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com;
s=default; t=1695384460;
bh=FzsmSd9A2JSrvG+PLZ9Rf9GjUqJYLOK9IsNFFplKzWE=;
h=Date:Subject:To:References:In-Reply-To:List-Id:List-Unsubscribe:
List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:
From;
b=uMuH1Tu4HAIApro1Y3h0+34TjtFE1SA/Rlk59BR4BWCKa/QihVWttBe5QARI9lsDp
/DTaDLUyheAfy5feOJTDcmEBaOZqbevePumaCtE3uXUA4l9nlm500ZXmMsKulzUlsf
+YwbOO77sAdK3oqe3KkXveA4zyLVRIXoxy48TR4M=
X-Original-To: cygwin AT cygwin DOT com
Delivered-To: cygwin AT cygwin DOT com
DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org C66F63858D28
X-Authority-Analysis: v=2.4 cv=XZqaca15 c=1 sm=1 tr=0 ts=650d8365
a=DxHlV3/gbUaP7LOF0QAmaA==:117 a=DxHlV3/gbUaP7LOF0QAmaA==:17
a=IkcTkHD0fZMA:10 a=Bfo1rFtExsEw4DxCo20A:9 a=QEXdDO2ut3YA:10
Message-ID: <8ccc20eb-b921-d6d1-bc61-03aa24314ebd@Shaw.ca>
Date: Fri, 22 Sep 2023 06:07:00 -0600
MIME-Version: 1.0
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.15.1
Subject: Re: Shell API to get Windows SID from Cygwin name?
To: Martin Wege <martin DOT l DOT wege AT gmail DOT com>, cygwin AT cygwin DOT com
References: <CANH4o6Myw2==vuhFQ=5ux3vj991u3-qEofQpbTOr3CYUJBf-Gw AT mail DOT gmail DOT com>
Organization: Inglis
In-Reply-To: <CANH4o6Myw2==vuhFQ=5ux3vj991u3-qEofQpbTOr3CYUJBf-Gw@mail.gmail.com>
X-CMAE-Envelope: MS4xfKELFAl0RHKNdJbpl7Dp7F+NTvEAy3BEejdLh9YX45BlEIVwg7CEPxP07Zc5JhUk6DkxIlU02TMnx7EK0iE9MYSduIr7Y4zoE2/m9ZnFdFXDlF26Rq4n
vf5S5wSXwKpHsIPPZqcmmG1p+2A1WxPGD/i+gFOUrJAkR5n+tONL3uwVBz1EzR8JSmcSQ0hlzTZZ9kKfKIIqcXtAPxSHxQsRivJSFSNgBWF1FuEJvQvDa7/u
X-Spam-Status: No, score=-4.1 required=5.0 tests=BAYES_00, DKIM_SIGNED,
DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, NICE_REPLY_A, RCVD_IN_DNSWL_LOW,
SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham 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: Brian Inglis via Cygwin <cygwin AT cygwin DOT com>
Reply-To: Brian DOT Inglis AT Shaw 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 38MC7fRH015652

On 2023-09-21 23:58, Martin Wege via Cygwin wrote:
> Does Cygwin have a shell (e.g. bash) API to lookup the Windows SID for
> a given Cygwin user or group name?
> /usr/bin/getent usersid thisisausername

Forget Windows! Think Unix:

$ getent passwd $USER	# sanitized output:
$USER:*:$UID:545:U-$HOSTNAME/$USER,S-1-5-21-...-...-...-1001:$HOME:/bin/bash

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