public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: Kacper Michajlow <kasper93@gmail.com>
To: cygwin@cygwin.com
Subject: Re: [ANNOUNCEMENT] TEST RELEASE: Cygwin 2.4.0-0.4
Date: Sun, 29 Nov 2015 16:37:00 -0000	[thread overview]
Message-ID: <CABPLASTWGXVXf+YVx5Uwp6wqZqBmWRmkrFdoKCPR30QEV+4BVA@mail.gmail.com> (raw)
In-Reply-To: <20151129125921.GA2755@calimero.vinschen.de>

[-- Attachment #1: Type: text/plain, Size: 3443 bytes --]

2015-11-29 13:59 GMT+01:00 Corinna Vinschen <corinna-cygwin@cygwin.com>:
> On Nov 29 02:16, Andrey Repin wrote:
>> Greetings, Kacper Michajlow!
>>
>> >> Please also attach the output of `id' and of `getfacl . test test/test'.
>>
>> > getfacl attached. `id` output is already in cygcheck.log
>>
>> > In getfacl output this line `default:group:1001 <unknown>:r-x` looks
>>
>> Uh-oh.
>> Do you, by any chance, have /etc/passwd file?
>> Or a user comment changing relevant information?
>
> I agree with Andrey here: Uh oh!
>
> The mkdir trace contains a suspicious snippet which is the reason
> the mkdir call doesn't manage to post-process the ACL:
>
>   [...] pwdgrp::fetch_account_from_windows: LookupAccountSidW (S-1-5-32-1001), Win32 error 1332
>   [...] /[...]/security.cc:337 status 0xC0000078 -> windows error 1337
>
> Status 0xC0000078 aka Win32 error 1337 means "invalid SID".  And the
> SID 1-5-32-1001 is in fact invalid.  The S-1-5-32 prefix denotes a builtin
> account, but the RID 1001 is invalid for a builtin group.  1001 is the
> RID of your user account, though, but that would be prefixed by the SID
> of your machine, which looks like S-1-5-21-XXXXXXXX-YYYYYYYY-ZZZZZZZZ.
> I don't see how this broken SID came into life, unless your /etc/passwd
> and/or /etc/group files are broken (hand edited perhaps?).

I guess I only changed shell to zsh in /etc/passwd, but no other
changes were made. So I have no idea how they could get corrupted
either.

> You're aware that you don't need the /etc/passwd and /etc/group files
> anymore, aren't you?  https://cygwin.com/cygwin-ug-net/ntsec.html

I never really thought about it until it worked. But yeah, this might
be good time to abandon those files.

>
> For testing I'd like you to do the following:
>
> - Edit /etc/nsswitch,conf and change the "passwd:" and "group:" lines
>   to omit checking the passwd and group files:
>
>     passwd: db
>     group: db
>
> - Exit all Cygwin processes and restart a shell.
>
> - Call `id' again and attach it to your reply.  The uids and gids of
>   your account and primary group should be different now.
>
> - Remove the test dir, call `mkdir -p test/test' and call icacls on test
>   and test/test.

$ icacls test
test NULL SID:(DENY)(Rc,S)
     DOMEK\Kacper:(F)
     DOMEK\Kacper:(RX)
     Wszyscy:(RX)
     NULL SID:(OI)(CI)(IO)(DENY)(Rc,S)
     TWORCA-WLASCICIEL:(OI)(CI)(IO)(F)
     GRUPA TWORCOW:(OI)(CI)(IO)(RX)
     Wszyscy:(OI)(CI)(IO)(RX)

$ icacls test/test
test/test NULL SID:(DENY)(Rc,S)
          DOMEK\Kacper:(F)
          DOMEK\Kacper:(RX)
          Wszyscy:(RX)
          NULL SID:(OI)(CI)(IO)(DENY)(Rc,S)
          TWORCA-WLASCICIEL:(OI)(CI)(IO)(F)
          GRUPA TWORCOW:(OI)(CI)(IO)(RX)
          Wszyscy:(OI)(CI)(IO)(RX)

BTW. icacls doesn't handle UTF-8 characters well. Just saying.

> - Try chmod 755 test/test again.

Works.

> - Also, would you mind to attach your /etc/passwd, /etc/group and
>   /etc/nsswitch.conf files to your reply?

/etc/nsswitch.conf has only commented out default values. Two others
are attached. To make this clear, I never edited those files except
zsh change so if they are corrupted in any way they must have been
produced like that. Though it probably was over the year ago when I
installed cygwin on this machine.

I personally am fine with abandoning /etc/passwd and /etc/group. This
is good enough solution for me. Though there might be other people
with the same issue.

-Kacper

[-- Attachment #2: id.log --]
[-- Type: application/octet-stream, Size: 392 bytes --]

uid=197609(Kacper) gid=197609(Kacper) grupy=197609(Kacper),401408(Poziom obowiązkowości — średni),197622(HomeUsers),559(Użytkownicy dzienników wydajności),545(Użytkownicy),4(INTERAKTYWNA),66049(LOGOWANIE DO KONSOLI),11(Użytkownicy uwierzytelnieni),15(Ta organizacja),68470(MicrosoftAccount+<removed email>),113(Konto lokalne),66048(LOKALNY),262180(Uwierzytelnianie konta w chmurze)

[-- Attachment #3: group --]
[-- Type: application/octet-stream, Size: 1117 bytes --]

root:S-1-5-32-544:0:
SYSTEM:S-1-5-18:18:
TrustedInstaller:S-1-5-80-956008885-3418522649-1831038044-1853292631-2271478464:4294967294:
Administratorzy:S-1-5-32-544:544:
Administratorzy funkcji Hyper-V:S-1-5-32-578:578:
Czytelnicy dzienników zdarzeń:S-1-5-32-573:573:
Goście:S-1-5-32-546:546:
IIS_IUSRS:S-1-5-32-568:568:
Operatorzy konfiguracji sieci:S-1-5-32-556:556:
Operatorzy kopii zapasowych:S-1-5-32-551:551:
Operatorzy kryptograficzni:S-1-5-32-569:569:
Operatorzy pomocy kontroli dostępu:S-1-5-32-579:579:
Replikator:S-1-5-32-552:552:
Użytkownicy:S-1-5-32-545:545:
Użytkownicy DCOM:S-1-5-32-562:562:
Użytkownicy dzienników wydajności:S-1-5-32-559:559:
Użytkownicy monitora wydajności:S-1-5-32-558:558:
Użytkownicy pulpitu zdalnego:S-1-5-32-555:555:
Użytkownicy zaawansowani:S-1-5-32-547:547:
Użytkownicy zarządzania zdalnego:S-1-5-32-580:580:
HomeUsers:S-1-5-21-1427734210-1040034221-1187108973-1002:1002:
WinRMRemoteWMIUsers__:S-1-5-21-1427734210-1040034221-1187108973-1000:1000:
Brak:S-1-5-21-1427734210-1040034221-1187108973-513:513:
Kacper:S-1-5-21-1427734210-1040034221-1187108973-1001:11001:

[-- Attachment #4: passwd --]
[-- Type: application/octet-stream, Size: 834 bytes --]

SYSTEM:*:18:544:,S-1-5-18::
LocalService:*:19:544:U-NT AUTHORITY\LocalService,S-1-5-19::
NetworkService:*:20:544:U-NT AUTHORITY\NetworkService,S-1-5-20::
Administratorzy:*:544:544:,S-1-5-32-544::
TrustedInstaller:*:4294967294:4294967294:U-NT SERVICE\TrustedInstaller,S-1-5-80-956008885-3418522649-1831038044-1853292631-2271478464::
Administrator:unused:500:513:U-Domek\Administrator,S-1-5-21-1427734210-1040034221-1187108973-500:/home/Administrator:/bin/zsh
Gość:unused:501:513:U-Domek\Gość,S-1-5-21-1427734210-1040034221-1187108973-501:/home/Gość:/bin/zsh
HomeGroupUser$:unused:1003:513:HomeGroupUser$,U-Domek\HomeGroupUser$,S-1-5-21-1427734210-1040034221-1187108973-1003:/home/HomeGroupUser$:/bin/zsh
Kacper:unused:1001:513:Kacper Michajłow,U-Domek\Kacper,S-1-5-21-1427734210-1040034221-1187108973-1001:/home/Kacper:/bin/zsh

[-- Attachment #5: Type: text/plain, Size: 218 bytes --]

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

  reply	other threads:[~2015-11-29 14:10 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-21 16:40 Corinna Vinschen
2015-11-23 18:09 ` Kacper Michajlow
2015-11-24  4:19   ` Andrey Repin
2015-11-26 13:24   ` Corinna Vinschen
2015-11-27 19:15     ` Kacper Michajlow
2015-11-27 19:24       ` Kacper Michajlow
2015-11-28 15:55         ` Corinna Vinschen
2015-11-28 23:20           ` Kacper Michajlow
2015-11-29  2:47             ` Andrey Repin
2015-11-29 14:01               ` Corinna Vinschen
2015-11-29 16:37                 ` Kacper Michajlow [this message]
2015-11-29 18:23                   ` Corinna Vinschen
2015-11-29 20:29                     ` Corinna Vinschen
2015-11-30 10:02                       ` Kacper Michajlow
2015-11-30 16:02                         ` Corinna Vinschen

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=CABPLASTWGXVXf+YVx5Uwp6wqZqBmWRmkrFdoKCPR30QEV+4BVA@mail.gmail.com \
    --to=kasper93@gmail.com \
    --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).