From: Brian Inglis <Brian.Inglis@SystematicSw.ab.ca>
To: cygwin@cygwin.com
Subject: Re: Groups command failing me in Windows 10
Date: Tue, 12 May 2020 23:34:17 -0600 [thread overview]
Message-ID: <39f6a31e-0b63-fc02-6b85-bea32f188c3d@SystematicSw.ab.ca> (raw)
In-Reply-To: <9222f81f1de828626cf048a4d938e2af@plebeian.com>
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.]
next prev parent reply other threads:[~2020-05-13 5:34 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-12 19:45 David
2020-05-12 20:33 ` David Macek
2020-05-13 0:43 ` Chris Wagner
2020-05-13 5:34 ` Brian Inglis [this message]
2020-05-14 10:04 ` Andrey Repin
2020-05-13 11:39 David
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=39f6a31e-0b63-fc02-6b85-bea32f188c3d@SystematicSw.ab.ca \
--to=brian.inglis@systematicsw.ab.ca \
--cc=cygwin@cygwin.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).