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=AeSGPGa3g03uPRcFz4lPBTd+cBBVobh2aBv5TzwRf+5ar/5RBbqcq cbPC2rwutQy3+oy/PAQcTKwPvUsU1fuSWVgH4IkVJfwQ4fN+3p17if0WG3xG9EKx KnNjGKGIRVXuZiaaco3vBFnsp3SjWllYdNf8T5Q0JZgaYGAPCaBpzA= 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=tucoUFabKlEIf5Kqr9/ddcWBErk=; b=XfQRyyqP4xPBbT1r9xejNEMOAXv6 vV2Tvm3BWSmeJygGLIBK0dKKvLqD6qKYw7aWIedUgyfxUqJNGWnsRmHcOnCDfFHS OBfoWcWLiNGRBdJsefxL5nJpd6/IAhrqMWrbfdy4Lv8LaBtAwdePd69W5j+YLi8b omz3I9jA4/nlgEg= Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , 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-Spam-SWARE-Status: No, score=-100.9 required=5.0 tests=BAYES_00,GOOD_FROM_CORINNA_CYGWIN,KAM_LAZY_DOMAIN_SECURITY,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.2 spammy=Stewart, stewart, username, HOME X-HELO: mout.kundenserver.de Date: Mon, 18 Feb 2019 09:45:18 +0100 From: Corinna Vinschen To: cygwin AT cygwin DOT com Subject: Re: Windows to Cygwin username mapping: Domain before local account when duplicate name? Message-ID: <20190218084518.GS4256@calimero.vinschen.de> Reply-To: cygwin AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com References: <20190215204326 DOT GO2702 AT calimero DOT vinschen DOT de> <3bace8f4-1097-9245-10e9-1ed54d1014f3 AT SystematicSw DOT ab DOT ca> <20190216094528 DOT GT2702 AT calimero DOT vinschen DOT de> <959f0e79-1ede-878a-6306-d0bdd8d7ef0e AT SystematicSw DOT ab DOT ca> <20190216153320 DOT GC4256 AT calimero DOT vinschen DOT de> <0d77615d-68fb-b1f4-114b-a91379371dc0 AT SystematicSw DOT ab DOT ca> <20190216174019 DOT GF4256 AT calimero DOT vinschen DOT de> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="1BKOZKwX7DAU5odC" Content-Disposition: inline In-Reply-To: <20190216174019.GF4256@calimero.vinschen.de> User-Agent: Mutt/1.10.1 (2018-07-13) --1BKOZKwX7DAU5odC Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Feb 16 18:40, Corinna Vinschen wrote: > On Feb 16 09:15, Brian Inglis wrote: > > On 2019-02-16 08:33, Corinna Vinschen wrote: > > > On Feb 16 08:09, Brian Inglis wrote: > > >> On 2019-02-16 02:45, Corinna Vinschen wrote: > > >>> On Feb 15 14:51, Bill Stewart wrote: > > >>>> On Fri, Feb 15, 2019 at 2:38 PM Brian Inglis wrote: > > >>>>> Windows normally allows "." to be used to refer to the local mach= ine name in a > > >>>>> domain context - can anyone confirm or deny whether this works in= Cygwin or with > > >>>>> getent? > > >>>> AFAICT, the "." shortcut does not work in Cygwin. > > >>> The combining operator for domain prepended usernames is '+'. This > > >>> is the same character as used by good old Interix for the same purp= ose. > > >> That was not in question - the question was could .+$USER be used in= lieu of > > >> $COMPUTERNAME+$USER or $HOSTNAME+$USER and should $COMPUTERNAME rath= er than > > >> $HOSTNAME be used in such contexts? > > > Yeah, I misunderstood this, sorry. The answer is no. The username is > > > fixed. Otherwise you'd have two auto-generated passwd entries for the > > > same user which may lead to confusion (not necessarily confusion on t= he > > > user side...) > > > If this is a desired feature, we could try this, but it might break > > > existing setups again. > >=20 > > As with .\$USER in Windows or with ~ for $HOME, this should only be a > > convenience to allow input or scripts to avoid providing $COMPUTERNAME/= $HOSTNAME > > in userid command line argument contexts. >=20 > I added this to Cygwin for testing so you can simply use ".+username" as > a shortcut for "$COMPUTERNAME+username". >=20 > I uploaded snapshots to https://cygwin.com/snapshots for playing. After some mulling, this is a bad idea. It potentially allows to circumvent OpenSSHs user/group name matching again, unless the Admin knows to add every local user twice, e.g. Match user MACHINE+user,.+user or use patterns: Match user *+user I'll revert the patch again. Corinna --=20 Corinna Vinschen Cygwin Maintainer --1BKOZKwX7DAU5odC Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEoVYPmneWZnwT6kwF9TYGna5ET6AFAlxqcJ4ACgkQ9TYGna5E T6A+UQ/+NQQo5hb9WumIC+y8mrGR3rVv6ky2xlWyvuhT1Ji8gweG78oPbmJP9tuW QCkkgXBM8I8iA6nov0JWUL2LtwZOkV1FE7rG014FZ/jjTOb2+h0lO6ym16QQI7WU IvEkTz6tBChrOTGI3jaK4IDcUulV+21l2tNxQK5AFMTvvjv+9++EZgZIbzqxhRvs MZkwUESkDdtfon4Q3TRdgESeGCeCtYxWK+daNVvNzmdtnuHbUOOpmWW5UbXlQ7S9 PN0kj5pgWWFPHBFwY81e4nRqBekopEaQNcyG6yyh9SJ0WLwKkdNrwRYxZRI6uyLf QLhIhm+FCqqXcniojwtfp/hB43DmmPxv3t1zSH2DZN1+EyJyiYCzqTY5wH9eK8yq /YwimSIAintaZquxEUhQnn2tBgqX7UamLof4H9wXvXkB4TcszzC2C8GwKy86jAGo n1pFOyHOO2We3AuJm8osJUJq6fD23xl/l+/mXKG/QfqhP+GGQPp6NJme3uvWc8Ta e2/VphTRohesd6gAkNdNaOmMEaCOkz9ULBUg4PfRLoQGYTx6MkJJRfz6mLK0avf+ jIkOcCI3crGqMhkxQTmUTlGj4XGe7in0GjWy7cAN6Kj3YXuosrJ5klKXKaTROb3n MAOuh18mTfMNSuVOobyXnFE5Mu4yy4RM9caCbOq5itX4N48G6Dk= =0wph -----END PGP SIGNATURE----- --1BKOZKwX7DAU5odC--