From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp-out-so.shaw.ca (smtp-out-so.shaw.ca [64.59.136.138]) by sourceware.org (Postfix) with ESMTPS id 4F2AB384A034 for ; Wed, 13 May 2020 05:34:20 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 4F2AB384A034 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=SystematicSw.ab.ca Authentication-Results: sourceware.org; spf=none smtp.mailfrom=brian.inglis@systematicsw.ab.ca Received: from [192.168.1.104] ([24.64.172.44]) by shaw.ca with ESMTP id Yk25jbXBVYYpxYk26j1Tsi; Tue, 12 May 2020 23:34:18 -0600 X-Authority-Analysis: v=2.3 cv=OubUNx3t c=1 sm=1 tr=0 a=kiZT5GMN3KAWqtYcXc+/4Q==:117 a=kiZT5GMN3KAWqtYcXc+/4Q==:17 a=IkcTkHD0fZMA:10 a=w_pzkKWiAAAA:8 a=S20-6DXMJZVTrYzEK4YA:9 a=QEXdDO2ut3YA:10 a=OO2XiV6ZNdAA:10 a=sRI3_1zDfAgwuvI8zelB:22 Reply-To: cygwin@cygwin.com Subject: Re: Groups command failing me in Windows 10 To: cygwin@cygwin.com References: <202005121945.04CJjgq5019928@sdf.org> <9222f81f1de828626cf048a4d938e2af@plebeian.com> From: Brian Inglis Autocrypt: addr=Brian.Inglis@SystematicSw.ab.ca; prefer-encrypt=mutual; keydata= mDMEXopx8xYJKwYBBAHaRw8BAQdAnCK0qv/xwUCCZQoA9BHRYpstERrspfT0NkUWQVuoePa0 LkJyaWFuIEluZ2xpcyA8QnJpYW4uSW5nbGlzQFN5c3RlbWF0aWNTdy5hYi5jYT6IlgQTFggA PhYhBMM5/lbU970GBS2bZB62lxu92I8YBQJeinHzAhsDBQkJZgGABQsJCAcCBhUKCQgLAgQW AgMBAh4BAheAAAoJEB62lxu92I8Y0ioBAI8xrggNxziAVmr+Xm6nnyjoujMqWcq3oEhlYGAO WacZAQDFtdDx2koSVSoOmfaOyRTbIWSf9/Cjai29060fsmdsDLg4BF6KcfMSCisGAQQBl1UB BQEBB0Awv8kHI2PaEgViDqzbnoe8B9KMHoBZLS92HdC7ZPh8HQMBCAeIfgQYFggAJhYhBMM5 /lbU970GBS2bZB62lxu92I8YBQJeinHzAhsMBQkJZgGAAAoJEB62lxu92I8YZwUBAJw/74rF IyaSsGI7ewCdCy88Lce/kdwX7zGwid+f8NZ3AQC/ezTFFi5obXnyMxZJN464nPXiggtT9gN5 RSyTY8X+AQ== Organization: Systematic Software Message-ID: <39f6a31e-0b63-fc02-6b85-bea32f188c3d@SystematicSw.ab.ca> Date: Tue, 12 May 2020 23:34:17 -0600 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.8.0 MIME-Version: 1.0 In-Reply-To: <9222f81f1de828626cf048a4d938e2af@plebeian.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-CA Content-Transfer-Encoding: 8bit X-CMAE-Envelope: MS4wfI9OESkfQAfADC8QleXuKv4B29Pf6i8qoQg0+QRjUT3l/OGBSC7X/0WX91e+vI/rePfkVUmOjjTMuUgFgTGuFw2wrU4sHp4djtKJzK0zi8KzKu3L0HDH VtlXNURV4q4zoOyzptRxwLsmz6REsHNVYLia1RYE2iC30DiALKaBpNurNBxpXvKGXJSY1+H1waikkw== X-Spam-Status: No, score=-15.0 required=5.0 tests=BAYES_00, KAM_DMARC_STATUS, KAM_LAZY_DOMAIN_SECURITY, KAM_NUMSUBJECT, RCVD_IN_DNSWL_LOW, SPF_HELO_NONE, SPF_NONE, TXREP autolearn=no autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: cygwin@cygwin.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: General Cygwin discussions and problem reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 May 2020 05:34:22 -0000 On 2020-05-12 18:43, Chris Wagner wrote: > On 2020-05-12 3:45 pm, David wrote: >> The groups command in the cmd window on Windows 10 shows None as my first group. >> When I use the dir command to create a file, the security display >> shows no error. >> When I use the touch command to create a file, I get "The permissions >> on ... are incorrectly ordered [NULL if first] > > Hi David.  The first thing to realize is that POSIX permissions and Windows ACLs > are almost impossible to reconcile.  Best to pick one and ignore the other. > > https://cygwin.com/cygwin-ug-net/ntsec.html has additional information. > > To set your group you should do it in /etc/passwd. > If you don't have one, do: mkpasswd > /etc/passwd > > Then edit the file and change the 4th field on the line with your username to > the group Id for Users. > > david:*:123456:197153: > -> > david:*:123456:545: > > Then restart ALL Cygwin processes and id should show Users as your primary > group.  Any files created by a Windows process however will still put None as > the group. > > Hope that helps. Instead of groups, use id, which shows both ids and names by default, in a form where you can easily distinguish names. Cygwin can use AD DC and SAM entries, so it's better *NOT* to create /etc/passwd and /etc/group files, and make tweaks in /etc/nsswitch.conf if required. For user settings, you can change your primary group in Cygwin for a local SAM account using e.g.: $ net user $USER /Comment:"" among other options; see the *Note* below *The desc schema*: https://cygwin.com/cygwin-ug-net/ntsec.html#ntsec-mapping-nsswitch-desc for full details. -- Take care. Thanks, Brian Inglis, Calgary, Alberta, Canada This email may be disturbing to some readers as it contains too much technical detail. Reader discretion is advised. [Data in IEC units and prefixes, physical quantities in SI.]