X-Recipient: archive-cygwin AT delorie DOT com DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org E37833858416 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com; s=default; t=1709535985; bh=QsFOezhJFnOQSGMFtPyPehGOKXFL58SpmiPu7pOa+60=; h=References:In-Reply-To:Date:Subject:To:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=BEtI0rmhVhI4dsqT9BI/w078llCE1gubJa9vW0y7KPCBJ4dIdoYdV2vGCWcR3tGX+ CTHqkQJi4rKaNhMEbxfmuQ2x/26PlAmkCYay9lef7JGBuzDRZvltzsxiRrKLEu9v/I sz2pCT12QsD6iX+cgBrD96Q6UmIUKP80kQ/Q7aYw= X-Original-To: cygwin AT cygwin DOT com Delivered-To: cygwin AT cygwin DOT com DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 41091385840F ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 41091385840F ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1709535962; cv=none; b=SjEeyb3BljJ3pFeugDl0OJsIZAOVVfpAbgFLz3ax+p/VsuHwtzHMYRTOLobPn9t+260VWd1CiszNPLxxPPeidPTX2fSjZiYG8HM020STRYYDYrnbWVc2lQPwdd0TCoM9LdeJwGfsoK53qCu4uXFXKlo93UkM3EWMN0AXmLvzm70= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1709535962; c=relaxed/simple; bh=waTnq3ei7LLfzT3XhZ507rAdiGfbVYDoUvcTcT3XVKU=; h=DKIM-Signature:MIME-Version:From:Date:Message-ID:Subject:To; b=KdRjzfMTqB6olfxxeW+veyz27gU9oWKLY37101gRBG1OKz4LQel1UEUJ/N3vTteSy+49ZNWMJLd3ZzbZHwdVq9IHf+PufOcmEkFSGuD/ftxkNjBRlQq2N7ZZS/ajAUbxvoqDI8WJxLGwVPI/FHVT9QDuQKxfxF4dwiIv5/yjNwk= ARC-Authentication-Results: i=1; server2.sourceware.org X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709535958; x=1710140758; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=9I4fgASPVRbkb1i7plZmZxSchnYCHyJftSySF+HnTi8=; b=Ce/sKxfeo9w3SVScDZgNNrkVIhMBM51IjxGXm9WZoyzGt5XIBcbByr1IWn3P1kUCU4 ZFlzxIKazkII9NoHCiuE/K7p5AUYR8le4s5zlBzTxYBgl5GQtoe5LZosWi1tFReBvAwr dUiDTIkDjglL8Ur70Bsr+uGM/7pDmPw6RKcIxD39OWxnwRWInRVVniR2O3zd2FMYCKg/ cvpDA95WU1t9+xPpy/cpaOhg4cJfq5ZKgsDk8lqGM6HPTLLDdE/g+RxZt1pLmv/JGp3Q IoyKQvWlAyNz8MtWpqRKDzWwP7GkO4/K567pdqpHuBBaN4X2O1vhucy9Jof4LXTKcD5p /3VA== X-Gm-Message-State: AOJu0Yxg1jfbxMNs0lYEwFlO7JJPL3GP0AZxBYTb562bEe0KhkCIxVFd MgMDQWyTa3OKManAaA3n8zyK/SDVBD+K4zmfdcJggcOpOCrmhptQvDxg1q3vf5yF0W6o/8GT4WY LcYLA4nj7XB+L7TTwtAy8U6jLqrhjMW1x X-Google-Smtp-Source: AGHT+IHcFwhntDte4PGAp8aXzRrwZrPhoK4Dfbl09j7CG62YI/D3UrWtyFUXLmuLGM4M+sydWHd9rhf0GZxu7BCn2VQ= X-Received: by 2002:aa7:d30d:0:b0:566:ff82:3161 with SMTP id p13-20020aa7d30d000000b00566ff823161mr3461022edq.24.1709535958520; Sun, 03 Mar 2024 23:05:58 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: Date: Mon, 4 Mar 2024 08:04:00 +0100 Message-ID: Subject: Re: How can I get the group SID for a file in cmd.exe (powershell is not an option)? To: cygwin AT cygwin DOT com X-Spam-Status: No, score=-0.5 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE 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 List-Archive: List-Post: List-Help: List-Subscribe: , From: Cedric Blancher via Cygwin Reply-To: Cedric Blancher Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "Cygwin" On Tue, 27 Feb 2024 at 16:07, Corinna Vinschen via Cygwin wrote: > > On Feb 27 15:41, Cedric Blancher via Cygwin wrote: > > Good afternoon! > > > > How can I get the group SID for a file in cmd.exe (powershell is not an option)? > > Is it possible to add an option to ls -l to list the user/group SIDs too? > > No, but you can use Cygwin tools: > > getent -w group $(ls -gn foo | awk '{print $3}') | awk -F: '{print $4}' I need the exact Windows SID strings, without intermediate translation. It's for a test suite written in cmd.exe (whoever had that idea, but I do not have the resources to rewrite it). Ced -- Cedric Blancher [https://plus.google.com/u/0/+CedricBlancher/] Institute Pasteur -- 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