delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2020/05/13/01:35:09

X-Recipient: archive-cygwin AT delorie DOT com
X-Original-To: cygwin AT cygwin DOT com
Delivered-To: cygwin AT cygwin DOT com
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 DOT inglis AT systematicsw DOT ab DOT ca
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
Subject: Re: Groups command failing me in Windows 10
To: cygwin AT cygwin DOT com
References: <202005121945 DOT 04CJjgq5019928 AT sdf DOT org>
<9222f81f1de828626cf048a4d938e2af AT plebeian DOT com>
From: Brian Inglis <Brian DOT Inglis AT SystematicSw DOT ab DOT ca>
Autocrypt: addr=Brian DOT Inglis AT SystematicSw DOT ab DOT 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>
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 AT cygwin DOT com
X-Mailman-Version: 2.1.29
List-Id: General Cygwin discussions and problem reports <cygwin.cygwin.com>
List-Unsubscribe: <http://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: <http://cygwin.com/mailman/listinfo/cygwin>,
<mailto:cygwin-request AT cygwin DOT com?subject=subscribe>
Reply-To: cygwin AT cygwin DOT com
Errors-To: cygwin-bounces AT cygwin DOT com
Sender: "Cygwin" <cygwin-bounces AT cygwin DOT com>
X-MIME-Autoconverted: from base64 to 8bit by delorie.com id 04D5YpjV030662

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:"<cygwin group=\"Users\">"

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.]
--
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