On Thu, Feb 28, 2019 at 2:39 AM Corinna Vinschen wrote: > > Since windows seems to adhere to the rule: > > "Case preserving", but "case ignoring", what does it > > mean to make sure all user and group names are > > case-correct? > > This all started here: > https://cygwin.com/ml/cygwin/2019-02/msg00109.html > > followed up with > > https://cygwin.com/ml/cygwin/2019-02/msg00113.html > > tl;dr: The easy and fast way out didn't work for accounts from > other domains than the machine's primary domain due to caching. > > So I thought it's a good idea to fetch the correct groupnames by an > additional LDAP call, but the performance hit is apparently too high in > some environments.
FWIW, not sure if you're using the IADsNameTranslate interface ( https://docs.microsoft.com/en-us/windows/desktop/api/iads/nn-iads-iadsnametranslate). .. Example pseudo-code: NameTranslate::Init(ADS_NAME_INITTYPE_GC, null); Then: accountName = 'domain\username'; NameTranslate::Set(ADS_NAME_TYPE_NT4, accountName); caseCorrectedName = NameTranslate::Get(ADS_NAME_TYPE_NT4); // DOMAIN\UserName Init depends on a available AD server (GC in this example), of course, but seems pretty fast in my tests. Bill -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple