public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: Corinna Vinschen <corinna-cygwin@cygwin.com>
To: cygwin@cygwin.com
Subject: Re: New passwd/group handling in Cygwin - test results and observations
Date: Sun, 16 Feb 2014 14:48:00 -0000	[thread overview]
Message-ID: <20140216143448.GR2246@calimero.vinschen.de> (raw)
In-Reply-To: <1184152333.20140216175202@yandex.ru>

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

On Feb 16 17:52, Andrey Repin wrote:
> Greetings, Corinna Vinschen!
> 
> >> > But this is a problem not different from Linux.  If you have a username
> >> > with non-ASCII chars, it will use *some* encoding in the passwd DB,
> >> > usually UTF-8 these days.  If you then change the codeset in your
> >> > application, you will still get your username in UTF-8.  It won't be
> >> > changed on the fly, just because your application calls setlocale.
> >> 
> >> I understand it (mostly), but there's actually two issues, not one.
> >> One issue is the display part, where names are output for user consumption.
> >> Another can be observed in, i.e., rsync, and file access in general (remember
> >> the discussion about accessing long directory names in unicode).
> >> Changing LANG variable DO matter for the latter, and you may only hope that
> >> whatever is output in the former case is actually printable (thank God, most
> >> of the time it actually is, in case of UTF-8).
> >> It is getting even more complicated, when you consider the fact, that in
> >> Windows you have 2 different single-byte encodings, so-called ANSI (for GUI
> >> applications) and OEM (for console). And alot of stuff making assumptions
> >> without consulting with current status of things.
> >> As convoluted the problem is, I think, we need some sort of solution, or at
> >> the very least - documentation.
> 
> > Sorry, I can't provide an easy solution, and afaik this is documented.
> 
> I don't know, how it did not hit my head earlier, but now that I think about
> it...
> The fact `ls' does not print correct group names, but correctly translate
> dates... eww, wait. There's something bad happens under the hood.
> 
> Please check this image: http://img513.imageshack.us/img513/43/jn7n.png
> LANG is set (pre-set, before Cygwin tree start) to ru_RU.UTF-8 for mintty and
> ru_RU.CP866 for console.
> As you can see, existing group (i.e. - "Administrators") is properly
> translated to chosen locale, which is not the case for group "Отсутствует".
> 
> The SID of the group "DAEMON2\Отсутствует" is S-1-5-21-1801674531-1644491937-1606980848-513
> 
> Cygwin show it as
> -rwxr-xr-x    1 197612 197121    45597 мар 22  2013 xargs.exe
> 
> which matching your description for "Accounts from the local machine's user DB
> (SAM)" (0x30000+513 =197121) (and yes, the leading part of the SID is matching
> the one of the other users on this system), but the group is missing from
> `wmic GROUP LIST' output. I presume, it was deleted at one point, or it is
> remnants of the previous OS installation, transferred over with the disk to
> this system. Either case explains the name of the group - "Missing" or
> "Nonexistent". Means, it's name does not exist in current SAM database.

No, it's the local group with the RID 513, which exists on *all*
machines, but is invisible, unless you call NetUserEnum, which
enumerates it, or you call NetUserGetInfo with the localized name.

This group is called "None" in the english OS versions, "Kein" in
the german version, "Aucun" in the french version, etc.  All local
users accounts have this group invariably set as their primary group.

For some reason Microsoft decided ages ago, that this group does
not show up in the GUI, and that it's not possible to change the primary
group outside of domains.  Why that is, I have no idea.


Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Maintainer                 cygwin AT cygwin DOT com
Red Hat

[-- Attachment #2: Type: application/pgp-signature, Size: 819 bytes --]

  reply	other threads:[~2014-02-16 14:34 UTC|newest]

Thread overview: 145+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-13 14:44 Testers needed: New passwd/group handling in Cygwin Corinna Vinschen
2014-02-13 16:05 ` Steven Penny
2014-02-13 16:17   ` Corinna Vinschen
2014-02-13 16:20     ` Corinna Vinschen
2014-02-13 16:42   ` Andrey Repin
2014-02-13 18:41     ` Lord Laraby
2014-02-13 18:49       ` Larry Hall (Cygwin)
2014-02-13 19:05         ` Lord Laraby
2014-02-13 19:37         ` Corinna Vinschen
2014-02-13 19:52       ` Andrey Repin
2014-02-14  0:31     ` Warren Young
2014-02-14  7:36       ` Andrey Repin
2014-02-14  8:00       ` Warren Young
2014-02-14  9:47         ` Corinna Vinschen
2014-02-13 19:33 ` Andrey Repin
2014-02-13 19:50   ` Corinna Vinschen
2014-02-13 19:41 ` m0viefreak
2014-02-13 19:56   ` Corinna Vinschen
2014-02-13 22:20   ` David Stacey
2014-02-14  9:05     ` Dave Kilroy
2014-02-14 10:16       ` Corinna Vinschen
2014-02-14 11:00         ` Corinna Vinschen
2014-02-14 13:51           ` Kurt Franke
2014-02-14 14:05             ` Corinna Vinschen
2014-02-14  9:49     ` Corinna Vinschen
2014-02-13 23:12 ` New passwd/group handling in Cygwin - test results and observations Andrey Repin
2014-02-14 10:42   ` Corinna Vinschen
2014-02-14 12:35     ` Andrey Repin
2014-02-14 14:13       ` Corinna Vinschen
2014-02-16 14:34         ` Andrey Repin
2014-02-16 14:48           ` Corinna Vinschen [this message]
2014-02-16 15:44             ` Corinna Vinschen
2014-02-16 15:52               ` Corinna Vinschen
2014-02-16 16:35                 ` Andrey Repin
2014-02-14  6:40 ` Testers needed: New passwd/group handling in Cygwin Warren Young
2014-02-14 10:48   ` Corinna Vinschen
2014-02-14 12:56     ` Andrey Repin
2014-02-14 14:15       ` Corinna Vinschen
2014-02-14 20:18     ` Warren Young
2014-02-14 21:49       ` Warren Young
2014-02-15 12:52       ` Corinna Vinschen
2014-02-16 11:48         ` Warren Young
2014-02-16 12:00           ` Corinna Vinschen
2014-02-16 14:50             ` Corinna Vinschen
2014-02-16 17:15               ` Christopher Faylor
2014-02-16 18:30                 ` Corinna Vinschen
2014-02-16 16:35             ` Warren Young
2014-02-16 16:53               ` Andrey Repin
2014-02-14 10:20 ` Frank Fesevur
2014-02-14 10:50   ` Corinna Vinschen
2014-02-14 12:05     ` Corinna Vinschen
2014-02-14 14:04       ` Ken Brown
2014-02-14 14:22         ` Corinna Vinschen
2014-02-14 15:23           ` Ken Brown
2014-02-15  2:51     ` Frank Fesevur
2014-02-15 12:56       ` Corinna Vinschen
2014-02-19  9:32         ` Frank Fesevur
2014-02-17 17:25 ` Corinna Vinschen
2014-02-19 15:05   ` Andrey Repin
2014-02-19 18:50     ` Corinna Vinschen
2014-02-19 19:32       ` Andrey Repin
2014-02-19 19:56         ` Corinna Vinschen
2014-02-19 20:27           ` Andrey Repin
2014-02-20 16:02             ` Corinna Vinschen
2014-02-20 17:35               ` Andrey Repin
2014-02-21 15:33   ` Corinna Vinschen
2014-02-21 16:29     ` Ken Brown
2014-02-21 16:31       ` Corinna Vinschen
2014-02-25 18:25 ` Achim Gratz
2014-02-25 19:16   ` Andrey Repin
2014-02-25 20:04     ` Achim Gratz
2014-02-25 20:25   ` Corinna Vinschen
2014-02-25 20:28     ` Achim Gratz
2014-02-25 21:55       ` Corinna Vinschen
2014-02-25 22:59         ` Andrey Repin
2014-02-26  3:09         ` Andrey Repin
2014-02-26 10:02           ` Corinna Vinschen
2014-02-26  9:06         ` Achim Gratz
2014-02-26 10:07           ` Corinna Vinschen
2014-02-26 16:12             ` Corinna Vinschen
2014-02-26 19:14               ` Achim Gratz
2014-02-27  9:08               ` Achim Gratz
2014-02-27  9:49                 ` Achim Gratz
2014-02-27  9:58                   ` Corinna Vinschen
2014-02-27 13:25                     ` Achim Gratz
2014-02-27 15:09                       ` Corinna Vinschen
2014-02-27 23:20                         ` Andrey Repin
2014-02-28 12:09                           ` Corinna Vinschen
2014-02-28 20:10                             ` Achim Gratz
2014-02-28 20:29                               ` Corinna Vinschen
2014-02-28 21:08                                 ` Frank Fesevur
2014-02-28 21:13                                   ` Corinna Vinschen
2014-02-28 21:50                                     ` Corinna Vinschen
2014-03-02 13:21                                     ` Frank Fesevur
2014-03-03  9:21                                       ` Corinna Vinschen
2014-03-03 12:19                                         ` Frank Fesevur
2014-03-03 12:29                                           ` Henry S. Thompson
2014-03-03 13:19                                             ` Corinna Vinschen
2014-03-03 17:06                                         ` Andrey Repin
2014-03-04  8:07                                           ` Warren Young
2014-03-04  8:08                                             ` Andrey Repin
2014-03-04  8:10                                               ` Warren Young
2014-03-04  8:19                                                 ` Corinna Vinschen
2014-03-05 16:47                                                   ` Warren Young
2014-03-05 20:18                                                     ` Andrey Repin
2014-03-05 23:09                                                     ` Corinna Vinschen
2014-03-03 18:24                                         ` Andy Hall
2014-03-01  8:59                                 ` Achim Gratz
2014-02-28 22:35                             ` Andrey Repin
2014-02-28 23:03                               ` Andrey Repin
2014-03-03  9:23                               ` Corinna Vinschen
2014-03-03 14:50                                 ` Andrey Repin
2014-03-03 15:07                                   ` Corinna Vinschen
2014-03-03 15:35                                     ` Andrey Repin
2014-03-03 15:41                                       ` Andrey Repin
2014-03-03 20:50                                     ` Andrey Repin
2014-03-03 22:28                                       ` Andrey Repin
2014-03-03 23:09                                     ` Andrey Repin
2014-03-04  0:37                                       ` Andrey Repin
2014-03-04 11:35                                       ` Corinna Vinschen
2014-02-28 15:49                     ` Achim Gratz
2014-02-28 17:43                       ` Corinna Vinschen
2014-03-10 18:14     ` Achim Gratz
2014-03-10 18:29       ` Corinna Vinschen
2014-03-10 19:21         ` Achim Gratz
2014-03-10 20:11           ` Corinna Vinschen
2014-03-10 20:37             ` Achim Gratz
2014-03-11 11:56               ` Achim Gratz
2014-03-11 12:07                 ` Corinna Vinschen
2014-03-11 12:40                   ` Achim Gratz
2014-03-11 13:37                     ` Corinna Vinschen
2014-03-11 17:06                       ` Achim Gratz
2014-03-11 18:14                         ` Corinna Vinschen
2014-03-11 18:50                           ` Achim Gratz
2014-03-11 19:56                             ` Achim Gratz
2014-03-12  9:27                               ` Corinna Vinschen
2014-03-12 18:00                                 ` Achim Gratz
2014-05-06 20:08                               ` Achim Gratz
2014-03-12  9:23                             ` Corinna Vinschen
2014-02-27 19:08 ` Frank Fesevur
2014-02-27 19:38   ` Andrey Repin
2014-02-27 20:16     ` Corinna Vinschen
2014-02-27 23:36       ` Andrey Repin
2014-02-27 20:10   ` Corinna Vinschen
2014-02-28 14:10     ` 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=20140216143448.GR2246@calimero.vinschen.de \
    --to=corinna-cygwin@cygwin.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).