X-Recipient: archive-cygwin AT delorie DOT com DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:subject:date:message-id:content-type :content-transfer-encoding:mime-version; q=dns; s=default; b=SDH BxO6ijq6TtAmLvWSlUWaA3IvmnKGiSECsFlkIwWA7u02lyhGBHFJ9jk/Xy7oArY0 Wvq3MSXcN3dgsNtOiEqYdIu+Ydu+G4u+MCq67Z8z5d3hpo849nKMnxTcL/Z2d8N/ cUGDpQxRxJsO0i21VfWum9RmkFGos3KajgXidRj4= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:subject:date:message-id:content-type :content-transfer-encoding:mime-version; s=default; bh=k/Qq2d8/I KJGHv31RnTt5bPYlnI=; b=XpfyDU9UCTGDwvpZh7R8hkM+QJ1R9pWQHtP05KjhB Bu7fggTh/AsVxnenA/b1r7izMValiPNeWydH64w+wcmLdPeiiUmrWs2E2BWxeR3u j0hN8SR5Z38yk8hO+pn4FIGxvQKgt214SMMsEIpZnMqn/sC2g4FR4TbjJTCOC55M bc= Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=0.8 required=5.0 tests=BAYES_50,RCVD_IN_DNSWL_NONE,SPF_PASS,T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: mx24.belgacom.be X-TM-IMSS-Message-ID:<6cfb6035000e920a AT belgacom DOT be> From: "PANEL Vincent (CIS/SIN)" To: "cygwin AT cygwin DOT com" Subject: Getting groups you belong to in perl Date: Thu, 13 Mar 2014 22:04:45 +0000 Message-ID: <09C6BA32B7B1654B8AB0CAF234F2A1C114E65CBA@A04066.BGC.NET> Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 X-IsSubscribed: yes Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id s2DM540g030395 Hello, Don't know if this list is more appropriate than the Perl one but my question is actually about porting a Perl script to Cygwin. I need to check if the current user running the script belongs to a pre-defined group. Under *nix, I get the list of users belonging to the group and see if the current user is in this list. Cygwin doesn't allow this way of working. I found out by reading the thread "Why mkgroup does not list group members?" on this mailing list (1 message on Mon, 13 May 2013 20:29:52, for instance). I would like to use perl commands without launching external commands, if possible. The way I've found until now is by using the output of the "id" command but I was wondering if there was another way to do it. How is "id" command working by the way ? Regards, ________________________________ ***** Disclaimer ***** http://www.belgacom.be/maildisclaimer -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple