• schleep (7/15/2012)


    I mentioned the login thing by way of illustrating the persistence of the oldnames.

    I don't want logins for individuals at all; they should have access by way of their group memberships.

    SQL Server is not able to resolve their newnames at all, and thus won't let them login.

    ---------------

    Are you sure a new sid is created on a rename? From MS:

    • Because it retains its security identifier (SID), a renamed user account retains all its other properties, such as its description, password, group memberships, user environment profile, account information, and any assigned permissions and rights.

    URL please.

    'Retaining' may be a key definition here given the context. Retaining may imply it is kept as the current SID, but not necessarily. It may mean that a new current SID is created and the previous one is retained in SID History. I see conflicting info about this and have no way to test or check it out at the moment. My virtual home lab complete with an AD forest with domain trusts and such is still only on the drawing board 😀

    Here is one detailed account of an issue with SIDs after renaming AD accounts: SQL Active Directory User ID SID Mismapings[/url]

    The only thing I'll say about the article is that the technique at the end about scripting out perms and recreating the login with the new name may not be necessary in all cases should ALTER LOGIN WITH NAME work as advertised.

    I'm wondering if the problem is the newname AD accounts that were created by copying the oldname accounts. That would generate a new sid. More from MS:

    ...Microsoft provides the ClonePrincipal API. When you create a new account, the API automatically adds the old account’s SID to the SID History attribute of the new account. The security logic that creates the user's access token then adds the content of the SID History attribute to the token. As a result, when the user logs on to the new infrastructure by using his or her new account, the access token will refer to the new SID and to the old SID. The user can then seamlessly access resources secured with the old SID hosted in the old infrastructure.

    And then when I delete the cloned newname account, and rename the oldname account, might that be where the confusion creeps in? But that doesn't completely explain why I only have problems on one server...

    The fact that some servers function and some do not is indeed odd.

    If I could find a way to see the sidhisory table, I could rule this in/out.

    The article linked to above shows you how to see the SID of a login using PsGetSid. I have not used it, but it may report history also or lead you to another executable in the same suite that can.

    Worst case if you run out of options you may need to script out the perms for these problematic SQL Server Logins, drop them, and re-add them just to clear the slate.

    There are no special teachers of virtue, because virtue is taught by the whole community.
    --Plato