From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 54656 invoked by alias); 13 Feb 2019 16:10:35 -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 54504 invoked by uid 89); 13 Feb 2019 16:10:35 -0000 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=H*r:mreue012 X-HELO: mout.kundenserver.de Received: from mout.kundenserver.de (HELO mout.kundenserver.de) (212.227.126.133) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 13 Feb 2019 16:10:33 +0000 Received: from calimero.vinschen.de ([24.134.7.25]) by mrelayeu.kundenserver.de (mreue012 [212.227.15.167]) with ESMTPSA (Nemesis) id 1MgARS-1hZN0K0lKA-00hg0k for ; Wed, 13 Feb 2019 17:10:30 +0100 Received: by calimero.vinschen.de (Postfix, from userid 500) id 76C44A8071B; Wed, 13 Feb 2019 17:10:29 +0100 (CET) Date: Wed, 13 Feb 2019 16:10:00 -0000 From: Corinna Vinschen To: cygwin@cygwin.com Subject: Re: sshd: computer name's case must match? Message-ID: <20190213161029.GY3718@calimero.vinschen.de> Reply-To: cygwin@cygwin.com Mail-Followup-To: cygwin@cygwin.com References: <20190213103200.GK3718@calimero.vinschen.de> <20190213122509.GL3718@calimero.vinschen.de> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="Q59ABw34pTSIagmi" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) X-SW-Source: 2019-02/txt/msg00122.txt.bz2 --Q59ABw34pTSIagmi Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-length: 2400 On Feb 13 08:53, Bill Stewart wrote: > On Wed, Feb 13, 2019 at 5:25 AM Corinna Vinschen > wrote: >=20 > > > sshd checks usernames case-sensitive against their name stored in the > > > user DB. The problem that you can use differently cased usernames > > > here is that the Windows function for checking the name is case- > > > insensitive, so it takes the username any way it comes in and > > > sshd eventually checks against the wrongly cased name. > > > > > > I fixed that partially in Cygwin by making sure that the account name > > > stored in the internal passwd/group info is stored case-correct: > > > https://cygwin.com/git/?p=3Dnewlib-cygwin.git;a=3Dcommitdiff;h=3D9a3c= c77b2afc > > > > > > So if you have a domain DOMAIN and a user xyz > > > > > > $ getent passwd DoMaIn+XyZ > > > > > > Prior to the above patch it returned > > > > > > DOMAIN+XyZ:... > > > > > > Now it will return > > > > > > DOMAIN+xyz:... > > > > > > The problem is this: If the account is from another domain than the > > > local machine or the machine domain, the call to LookupAccountSid to = fix > > > the account name won't fix the account name. > > > > > > Apparently the account name is cached on the local machine in exactly > > > the same spelling as has been used when asking for the account the fi= rst > > > time. I still have to find a way to workaround that. > > > > That should be fixed now as well. I uploaded new developer snaps to > > https://cygwin.com/snapshots/ and will generate YA test release later > > today. >=20 > Thanks for taking a look at it. >=20 > Now the problem is that the username must be specified with the correct c= ase. >=20 > It used to work with COMPUTERNAME+username - where 'username' might > contain an uppercase character, but I could type it in all lower-case. >=20 > Now I have to type the username in all correct case, which seems unexpect= ed. >=20 > >From a Windows perspective, usernames are case-retentive but not > case-sensitive, so this behavior seems unexpected. >=20 > Expected behavior: Ignore case in both computer names and user names. This can't work correctly with OpenSSH. The decision to allow only the correct case in OpenSSH was made back in 2010, because otherwise we would need a lot of special rules in OpenSSH just for Cygwin. Sorry, but that's how it is. Corinna --=20 Corinna Vinschen Cygwin Maintainer --Q59ABw34pTSIagmi Content-Type: application/pgp-signature; name="signature.asc" Content-length: 833 -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEoVYPmneWZnwT6kwF9TYGna5ET6AFAlxkQXUACgkQ9TYGna5E T6AhMw//R0m7rh3tMEqgXMSF4MKL2HEWQ9e8EIlS/DLpq2D58DXPRLOOv9DXpJcX upXCJxNtK4/mWYRJ/TYudvGHfqcQUTqGIQKcFNujMhFYGaH3s6fjpits/f1H4Xxo djKVzWzTLTORg3FJrVszI/I5nX37LP24b5v24TguYRaJHyeWuEuCeNeF/wwPSrEy h0dxHvdgpKMDrMh6XbzuQeMzjDqZjzm3zPoev26YFuMjwVFcVywoKN1h12mL8O11 AxZor5qZ9rCURNFNJS94jpHz1lKeNWqDk02WRzoEMPQph5S9tR3J72zDfNEtDoKf ntVQrhW1V9elG2Pm3gnKYfILf6bnX+lN2x5C5jA49jPiCg2x/OW6x2qFIx+BSCBl ipFau4DBlKYBlEv7WZHruuuL5SA9RP+pza/saZPx1bIucJYuxCVmbobqGSsUeROt 7+yrqa3HBEg1BHF8ABwOMg2FqAU4POXue9E56WFsLr7Tfbi+BlBK2/rakHNR8fYO 4U6gV/8FcoKZ2EEGhFtpGcoe0yg0EwOw6Wq57gr64/mLROLxiPfaBCgR+8Yve9Ao aePyghNal3Jcvt2sEkU+xTalYp0OIyvHefiI5NDYkcZ60Y8suk0nEChrXfTVgmSf Hof1nDReCnGpi4vWivmwJuIx2kh5IJcOcr6mQmg41PHg1Crvs64= =h8W6 -----END PGP SIGNATURE----- --Q59ABw34pTSIagmi--