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? Content-Language: en-CA To: Martin Wege , cygwin AT cygwin DOT com References: Organization: Inglis In-Reply-To: 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 Precedence: list List-Id: General Cygwin discussions and problem reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Brian Inglis via Cygwin Reply-To: Brian DOT Inglis AT Shaw DOT ca Content-Type: text/plain; charset="utf-8"; Format="flowed" Errors-To: cygwin-bounces+archive-cygwin=delorie DOT com AT cygwin DOT com Sender: "Cygwin" Content-Transfer-Encoding: 8bit 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