{"id":6,"date":"2016-09-05T20:23:46","date_gmt":"2016-09-05T19:23:46","guid":{"rendered":"http:\/\/wp.bizoir.dk\/?p=6"},"modified":"2017-02-16T18:09:28","modified_gmt":"2017-02-16T17:09:28","slug":"windows-many-versions-caches-old-ad-account-information","status":"publish","type":"post","link":"https:\/\/wp.bizoir.dk\/?p=6","title":{"rendered":"Windows (many versions) caches old AD-account information"},"content":{"rendered":"<p>Windows &#8211; both client and server, in many versions &#8211; caches old AD-account information.<\/p>\n<p>Most often, this gives problems, when a user changes their username in AD, but on another server, the old username is cached and associated with the users SID. So when a username for a given SID is requested on the other server, the old username is returned.<\/p>\n<p>The reasoning behind the functionality can be found here:<\/p>\n<p id=\"mt7\" class=\"col-xl-20 col-md-18 title ng-scope\" title=\"The LsaLookupSids function may return the old user name instead of the new user name if the user name has changed\"><a href=\"https:\/\/support.microsoft.com\/en-us\/kb\/946358\">The LsaLookupSids function may return the old user name instead of the new user name if the user name has changed<\/a><\/p>\n<p class=\"col-xl-20 col-md-18 title ng-scope\" title=\"The LsaLookupSids function may return the old user name instead of the new user name if the user name has changed\">The cache can be disabled by inserting DWORD 0 in registry-key <strong class=\"uiterm\">HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Lsa<\/strong>\\<strong class=\"uiterm\">LsaLookupCacheMaxSize<\/strong><\/p>\n<p class=\"col-xl-20 col-md-18 title ng-scope\" title=\"The LsaLookupSids function may return the old user name instead of the new user name if the user name has changed\">This article gives no other method to reset the cache &#8211; apart from restarting the server.<\/p>\n<p class=\"col-xl-20 col-md-18 title ng-scope\" title=\"The LsaLookupSids function may return the old user name instead of the new user name if the user name has changed\">Other users have found better solutions &#8211; such as running the short 2-line PowerShell given below, which updates the cached AD-information for the given user.<\/p>\n<p><a href=\"http:\/\/serverfault.com\/questions\/266180\/purging-ad-principal-from-cache\">http:\/\/serverfault.com\/questions\/266180\/purging-ad-principal-from-cache<\/a><\/p>\n<p>$objuser = new-object system.security.principal.ntaccount &#8220;domain\\&lt;new account name&gt;&#8221;<br \/>\n$objuser.translate([system.security.principal.securityidentifier])<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Windows &#8211; both client and server, in many versions &#8211; caches old AD-account information. Most often, this gives problems, when a user changes their username in AD, but on another server, the old username is cached and associated with the users SID. So when a username for a given SID is requested on the other &hellip; <a href=\"https:\/\/wp.bizoir.dk\/?p=6\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Windows (many versions) caches old AD-account information&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"link","meta":{"footnotes":""},"categories":[11],"tags":[14,15,13],"class_list":["post-6","post","type-post","status-publish","format-link","hentry","category-diverse","tag-ad","tag-iis","tag-windows","post_format-post-format-link"],"_links":{"self":[{"href":"https:\/\/wp.bizoir.dk\/index.php?rest_route=\/wp\/v2\/posts\/6","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wp.bizoir.dk\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/wp.bizoir.dk\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/wp.bizoir.dk\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/wp.bizoir.dk\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=6"}],"version-history":[{"count":2,"href":"https:\/\/wp.bizoir.dk\/index.php?rest_route=\/wp\/v2\/posts\/6\/revisions"}],"predecessor-version":[{"id":8,"href":"https:\/\/wp.bizoir.dk\/index.php?rest_route=\/wp\/v2\/posts\/6\/revisions\/8"}],"wp:attachment":[{"href":"https:\/\/wp.bizoir.dk\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=6"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/wp.bizoir.dk\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=6"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/wp.bizoir.dk\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=6"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}