delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2014/02/16/09:35:10

X-Recipient: archive-cygwin AT delorie DOT com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:date:from:to:subject:message-id:reply-to
:references:mime-version:content-type:in-reply-to; q=dns; s=
default; b=WDqYbur4yJ//GAx1ejzP7QWL+9dsTQa+WEMCj0sRy/W29m3w92FJ8
fcOLWe/3h9tIV1US55+E0/y5kWPSCdKo47RZiHCvutETvTLFRhfXkc5RGLvr2f5z
LneKS+AQOAaLvL3onSycIjYpxQwyjvU/duvxd0dDePLGC46YaPD98U=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:date:from:to:subject:message-id:reply-to
:references:mime-version:content-type:in-reply-to; s=default;
bh=9lTkS1WIPvT9YPdnl9FkAKMR++4=; b=JguWq1DKqJLLq/cE0Y3wwTzhsXqj
Hwh6afYD7GpBPi4VpFYHZj9pAd5Gtys9cNM2NARMmXLl0Rs3/JanVDs1UJFK6UEd
dGDuVzMBMBRkEqeNUMoZENl2+yGZ5BIf4h5ziGYpDopo95Knz0h7lLp7ldfHyrhw
fDvoOO6KMUfX3QU=
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
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
Date: Sun, 16 Feb 2014 15:34:48 +0100
From: Corinna Vinschen <corinna-cygwin AT cygwin DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: New passwd/group handling in Cygwin - test results and observations
Message-ID: <20140216143448.GR2246@calimero.vinschen.de>
Reply-To: cygwin AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
References: <20140213143849 DOT GH2246 AT calimero DOT vinschen DOT de> <1717869165 DOT 20140214021113 AT mtu-net DOT ru> <20140214102044 DOT GX2246 AT calimero DOT vinschen DOT de> <1078913914 DOT 20140214155631 AT mtu-net DOT ru> <20140214140532 DOT GD2246 AT calimero DOT vinschen DOT de> <1184152333 DOT 20140216175202 AT yandex DOT ru>
MIME-Version: 1.0
In-Reply-To: <1184152333.20140216175202@yandex.ru>
User-Agent: Mutt/1.5.21 (2010-09-15)

--XzwO5SPJOYU+7Pos
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

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

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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019