Disabled user account generates SID error in exchange

Error Event ID: 1022 "The disabled Active Directory user account associated with the mailbox in question might not have the MSExchMasterAccountSID attribute populated. "

This is on a user's mailbox whose AD account I disabled.

I want to keep the mailbox for 1 month and then remove it.  How do I rectify this?  I know there is 1 SID you can use in exchange for disabled accounts, but i don't remember how to activate it.

Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

does this help
When you move a mailbox from a Microsoft Exchange Server 5.5 computer to a Microsoft Exchange 2000 Server computer or to a Microsoft Exchange Server 2003 computer, you may receive the following error message:
Error: Opening destination mailbox.
CN=DDD R1,OU=Recipients,DC=dune,DC=com:
The information store could not be opened.
The MAPI provider failed.
MAPI 1.0
ID no: 8004011d-0289-00000000
Additionally, the following event ID messages may be logged in the Application log:
Event Type: Information
Event Source: MSExchangeAdmin
Event Category: Move Mailbox
Event ID: 1006
Date: 11/3/2000
Time: 4:24:53 PM
User: N/A
Computer: ALIA
Started to move mailbox 'DDD R1'.
Source Database: /o=Microsoft/ou=AdminGroup/cn=Configuration/cn=Servers/cn=SERVER1/cn=Microsoft Private MDB
Destination Database:
/o=Microsoft/ou=AdminGroup/cn=Configuration/cn=Servers/cn=SERVER2/cn=Microsoft Private MDB
Exchange DN: /o=Microsoft/ou=AdminGroup/cn=Recipients/cn=Alias
Event Type: Warning
Event Source: MSExchangeIS
Event Category: General
Event ID: 9548
Date: 11/3/2000
Time: 4:24:54 PM
User: N/A
Computer: ALIA
Disabled user /o=Microsoft/ou=AdminGroup/cn=Recipients/cn=Alias does not have a master account SID. Please use Active Directory MMC to set an active account as this user's master account.
Event Type: Error
Event Source: MSExchangeIS Mailbox Store
Event Category: Log ons
Event ID: 1022
Date: 11/3/2000
Time: 4:24:55 PM
User: N/A
Computer: ALIA
Log on Failure on database "First Storage Group\Private Information Store (ALIA)" - Windows 2000 account DOMAIN\administrator; mailbox /o=Microsoft/ou=AdminGroup/cn=Recipients/cn=ALIAS. Error: -2147221231
The error message ID 0x8004011d references MAPI_E_FAILONEPROVIDER. Error event IDs 0x80040111 and -2147221231 correspond to MAPI_E_LOGON_FAILED.

A similar sequence of errors may be displayed when you try to log on to an Exchange 2000 computer mailbox or an Exchange 2003 computer mailbox.
This problem can occur if the disabled Active Directory directory service user account that is associated with the mailbox does not have an msExchMasterAccountSID attribute.
The steps that are provided in this section are for disabling Active Directory user accounts that have Exchange 2000 mailboxes or Exchange 2003 mailboxes. If you follow these steps when you disable the account, event 9548 is not logged. If only a small number of mailboxes are exhibiting this problem, you can generate an msExchMasterAccountSID attribute. To do this, follow these steps: 1. In the Active Directory Users and Computers snap-in, on the View menu, click Advanced Features.  
2. In the Exchange Advanced properties of the disabled user object that owns the mailbox, click Mailbox Rights, and then search the list of accounts for one that has the Associated External Account permission.
3. If no account has this permission, grant the SELF account Associated External Account and Full Mailbox Access permissions.

Note The SELF account is available in all Windows 2000 domains. All SELF accounts share a well-known security identifier (SID) that is the same across all domains. If the SELF account is not already listed in the Permissions dialog box, you can add it by typing SELF as the account name.

Only one account at a time can have the Associated External Account permission. If this permission is currently owned by an account that is unwanted or that is not valid, you must remove the permission on that account before you apply the account to SELF.

After you remove the Associated External Account permission from an account, exit all properties dialog boxes for the disabled user object. (To do this, click OK, not Cancel, at each level.) You must do this because changes to permissions are not applied immediately, but only after you have exited the object properties for the user. You will be blocked from changing the owner of the Associated External Account permission until you have closed and re-opened the properties of the object.  
4. Reset the Associated External Account permission to SELF.
You can use LDAP tools, such as the Active Directory Service Interfaces (ADSI) Edit snap-in, the LDP utility or Ldifde to view the attributes of the user object to verify that the msExchMasterAccountSID attribute has been created. Because of directory replication and Exchange Server cache refresh latencies, it can take up to two hours after you make the change before the mailbox can be moved.

To set the msExchMasterAccountSID attribute for lots of disabled user accounts, you can use the Collaboration Data Objects for Exchange Management (CDOEXM) interface to modify the mailbox security descriptor. Starting with Microsoft Exchange 2000 Server Service Pack 2 (SP2), a new interface is made available in CDOEXM. This interface is named MailboxRights. This exposure lets you modify the mailbox security descriptor programmatically.

For more information about how to script a bulk change of the msExchMasterAccountSid attribute, click the following article number to view the article in the Microsoft Knowledge Base:
322890 (http://support.microsoft.com/kb/322890/) How to associate an external account with an existing Exchange 2000 mailbox
For additional methods that let you set the msExchMasterAccountSid attribute for lots of disabled user accounts, contact Microsoft Product Support Services. For more information about the support options that are available from Microsoft, visit the following Microsoft Web site:
http://support.microsoft.com/default.aspx?scid=fh;EN-US;CNTACTMS (http://support.microsoft.com/default.aspx?scid=fh;en-us;cntactms)
To determine how many disabled user accounts do not have the msExchMasterAccountSid attribute, you can generate an LDIF formatting export file. To do this, run the following Ldifde.exe command:
ldifde -f file.txt -d "dc=domain,dc=com" -l nothing -r "(&(objectcategory=person)(objectclass=user)(msexchuseraccountcontrol=2)(!(msexchmasteraccountsid=*)))"
The following list describes the Ldifde parameters: • -f: This switch indicates the export destination file.
• -d: This switch indicates that the Microsoft Windows domain from which to export user objects. For example, if the Active Directory Users and Computers management console for the domain lists the domain as corp.company.com, it would become "dc=corp,dc=company,dc=com".
• -l: This switch, if it is used, restricts output to the export file of only the attributes enumerated by the switch. In this case, the non-existent attribute nothing is used so that only object names, not attributes, are generated.
• -r: This switch indicates the LDAP search filter by using the standard LDAP query syntax. You can also use this search string with Ldp.exe and other LDAP tools. In this case, the search is for all user objects that are disabled (msExchMasterAccountControl value of 2) and that do not have an msExchMasterAccountSID attribute.
The following text is an example of the output file: dn: CN=AAA R1,OU=Recipients,DC=domain,DC=com
changetype: add

dn: CN=AAA R2,OU=Recipients,DC=domain,DC=com
changetype: add

. . . . .

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
victoriatechAuthor Commented:
Perfect!  That is exactly what i was looking for, the associated external account setting is the trick!

Thanks kindly for your prompt reply to my query.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Email Clients

From novice to tech pro — start learning today.