On Feb 13 08:53, Bill Stewart wrote: > On Wed, Feb 13, 2019 at 5:25 AM Corinna Vinschen > wrote: > > > > 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=newlib-cygwin.git;a=commitdiff;h=9a3cc77b2afc > > > > > > 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 first > > > 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. > > Thanks for taking a look at it. > > Now the problem is that the username must be specified with the correct case. > > It used to work with COMPUTERNAME+username - where 'username' might > contain an uppercase character, but I could type it in all lower-case. > > Now I have to type the username in all correct case, which seems unexpected. > > >From a Windows perspective, usernames are case-retentive but not > case-sensitive, so this behavior seems unexpected. > > 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 -- Corinna Vinschen Cygwin Maintainer