From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10402 invoked by alias); 16 Feb 2014 14:34:54 -0000 Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com Received: (qmail 10391 invoked by uid 89); 16 Feb 2014 14:34:52 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.3 required=5.0 tests=AWL,BAYES_50,BODY_8BITS,GARBLED_BODY,KAM_INFOUSME autolearn=no version=3.3.2 X-HELO: calimero.vinschen.de Received: from aquarius.hirmke.de (HELO calimero.vinschen.de) (217.91.18.234) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sun, 16 Feb 2014 14:34:51 +0000 Received: by calimero.vinschen.de (Postfix, from userid 500) id 5DE74520860; Sun, 16 Feb 2014 15:34:48 +0100 (CET) Date: Sun, 16 Feb 2014 14:48:00 -0000 From: Corinna Vinschen To: cygwin@cygwin.com Subject: Re: New passwd/group handling in Cygwin - test results and observations Message-ID: <20140216143448.GR2246@calimero.vinschen.de> Reply-To: cygwin@cygwin.com Mail-Followup-To: cygwin@cygwin.com References: <20140213143849.GH2246@calimero.vinschen.de> <1717869165.20140214021113@mtu-net.ru> <20140214102044.GX2246@calimero.vinschen.de> <1078913914.20140214155631@mtu-net.ru> <20140214140532.GD2246@calimero.vinschen.de> <1184152333.20140216175202@yandex.ru> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="XzwO5SPJOYU+7Pos" Content-Disposition: inline In-Reply-To: <1184152333.20140216175202@yandex.ru> User-Agent: Mutt/1.5.21 (2010-09-15) X-SW-Source: 2014-02/txt/msg00421.txt.bz2 --XzwO5SPJOYU+7Pos Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-length: 3688 On Feb 16 17:52, Andrey Repin wrote: > Greetings, Corinna Vinschen! >=20 > >> > But this is a problem not different from Linux. If you have a usern= ame > >> > 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. > >>=20 > >> I understand it (mostly), but there's actually two issues, not one. > >> One issue is the display part, where names are output for user consump= tion. > >> Another can be observed in, i.e., rsync, and file access in general (r= emember > >> 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 (fo= r GUI > >> applications) and OEM (for console). And alot of stuff making assumpti= ons > >> 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. >=20 > > Sorry, I can't provide an easy solution, and afaik this is documented. >=20 > I don't know, how it did not hit my head earlier, but now that I think ab= out > it... > The fact `ls' does not print correct group names, but correctly translate > dates... eww, wait. There's something bad happens under the hood. >=20 > 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 "=D0=9E=D1= =82=D1=81=D1=83=D1=82=D1=81=D1=82=D0=B2=D1=83=D0=B5=D1=82". >=20 > The SID of the group "DAEMON2\=D0=9E=D1=82=D1=81=D1=83=D1=82=D1=81=D1=82= =D0=B2=D1=83=D0=B5=D1=82" is S-1-5-21-1801674531-1644491937-1606980848-513 >=20 > Cygwin show it as > -rwxr-xr-x 1 197612 197121 45597 =D0=BC=D0=B0=D1=80 22 2013 xargs.= exe >=20 > which matching your description for "Accounts from the local machine's us= er DB > (SAM)" (0x30000+513 =3D197121) (and yes, the leading part of the SID is m= atching > 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 --=20 Corinna Vinschen Please, send mails regarding Cygwin to Cygwin Maintainer cygwin AT cygwin DOT com Red Hat --XzwO5SPJOYU+7Pos Content-Type: application/pgp-signature Content-length: 819 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBAgAGBQJTAMyIAAoJEPU2Bp2uRE+gLCIP/0etVbVuwIV5AyNEYVmnkaE9 nN+y6ivbBaujslMjwZ4Q5zdDms0sDoYQT8IdXXscT+Xql/nBD7WgzE2ERN4gshPA 6j8XNVdn6wkqcdywUTbczNHbfoxQ3ViH1cNFY/2Jo5Qgamwsd4A/MlY43szmzcKB zrndt8nT5R4LylbNWa5tqYLekYYnIKFbMuaC96kTKdyjpUo2WB1QawJVPBKJjgLv fZdZtvrPu/ZWFGwOClwRJLuiiHIX6dNw7fQTwH21aBGFV0y5N8F+khVICVggvLEe W0myEPTfLUTmmrtd9oF6kCCWutizidIJX/w/jwpu0OfChWvxvBebVIn90kgoKUlt IN4oxRlmyTOP9qumFd29k0kukirVmHN+HLjSoBXsVgC/AagCwPSDLbOy5HVHBvT1 xenHU3i0gZS1q/5/MsY/EqdR6MGwPCEEoLLfN6pn3B3V0tk2gjCPTqtiMucCF9NO aYldmlXTdwWdUX4mjLL+8sC8dIhGbCS2VG2jPxnpkaOW7h1D/mubxpL2KPR/VdU5 TYX7kosQ4MpGEJFAW/+8K24CVvXnmOrSUU4tuV9QXLH+DB/qDV7jIfb5exSOFUVM M1AnS0F7zxQUmdNf5p9EO3UmypuVb0coHbyNRvoSvnYK5eQHX+dcCA0/DULAn7ai sodrAX7b1suFlqXNJ/nb =XqKG -----END PGP SIGNATURE----- --XzwO5SPJOYU+7Pos--