The toughest job on earth is to be the MIS Administrator at a technology consulting company. Can you imagine having to put up with all the monster ego’s and know-it-all’s that inhabit a relatively successful consultancy?! Just think about all the people telling you how to do your job and bitching that they should have administrator access to the environment because “they do this for clients”. This is the life of my friend and network admin Charlie (his last name has been omitted to protect the innocent).
And with all that said, it is he who ran into a strange issue in our internal AD and Exchange environment that neither I, nor a very experienced friend (whose name will be full omitted because I doubt he wants to be associated with this blog
at Microsoft Consulting Services, have ever seen before.
Specifically he deleted a Contact a few weeks ago from the local Domain NC (Naming Context, or directory partition for those who care). Yet this contact object persisted in the Exchange GAL. Now, the GAL in Exchange 200x is, in fact, the AD Global Catalog and both Outlook 2000+ and the Exchange 200x DS proxy (which is used by legacy clients such as Outlook 98) query the GC to build and return GAL requests and entries. Even online (meaning non OAB) queries to the GAL were returning this contact, so it appeared this object persisted in the GC despite being deleted from the DomainNC in which it was homed. This is very, very strange, to say the least.
Now here is where it gets really weird. The GC partial replica set for the DomainNC and the actual DomainNC the GC is a member of are one and the same, so addition and deletion of that contact object should have happened immediately. However since it didn’t, Charlie went and (in an attempt to clean up the GAL after two week of this object lingering) used the Exchange System Manager to delete the contact by expanding the All Global Address Lists node and selected the properties of the Default Global Address List and from the General Tab of the properties page he clicked the Preview button to list the entire GAL. Now, thanks to uber-smart-person Mark Russinovich and his tool Process Explorer, I was able in realtime to view the netstat activity of the System Manager MMC snapin and validate that, in fact, the GAL preview is sourced from the Global Catalog. HOWEVER, any action such as viewing the properties of the object causes the MMC process to open a direct STANDARD ldap connection to a DC in the Domain the object is homed in. Once the objects are listed in the preview window, the GC connection is closed.
What this means is that when Charlie deleted the object, he in fact deleted it from the DomainNC for a second time! In fact, if you try to delete and object directly from the GC (using LDP or ADSI edit) you will be refused the action by the server. So the big question is what was up with that contact and why was it hidden from the standard AD Users and Computers yet was still visible from the GC AND was clearly still and instantiated AD object (since the delete option would have failed if the object wasn’t in the DomainNC). Also, why didn’t it delete the way it was supposed to?
Well, I have a couple of theories, but at this point that’s all they are. The first is that the ADC replicated the object back from Exchange 5.5, but that makes no sense since the object should have been deleted on the 5.5 side as soon as the ADC CA picked up the deletion from the AD and it doesn’t explain why the object was not visible from ADUC.
The second theory is that the object was deleted (meaning that it was in the deleted objects container in the domain NC), but that the change to a deleted object was somehow not represented in the GC instance of the object. Since the object was tombstoned in the DomainNC and hadn’t yet been garbage collected, it would technically still exist. Perhaps the second delete action caused the proper deletion of the GC instance of the object to occur. If this was the case, then that would point to a major inconsistency in the AD and one hell of a bug. I find this explanation far less likely than the first, though neither one really makes any sense at all.
Had the time existed for me to properly diagnosis the issue, I would have used LDP with the “Return Deleted Objects” object control turned on to see if there was (a.) a second instance of the contact and (b.) if there was a deleted instance of the contact. This brings me to my first tip of the day:
Need to view tombstoned objects in the AD? Use LDP with the “Return Deleted Objects” control enabled by selecting the Options menu and Controls. In the load predefined drop down list, select Return Deleted Objects. You can now browse you tombstoned objects to your hearts delight.
My second tip of the day is if you need to set certain AD objects so that they are always created with a certain set of entries in the objects ACL, you can do this by opening the AD Schema MMC snap-in, select the properties of the class object and edit the ACE’s on the Default Permission tab. What you are doing is changing the values of the defaultSecurityDescriptor attribute on the class object. Now, any instance of that object that is created will have the security descriptor you just specified (and if you uncheck inheritance, the object will get that descriptor regardless of container ACL’ing or inheritance). Remember to reload the schema to get your changes to take effect and, as always, be extremely careful when modifying the AD schema.
Well that’s enough geeking for one day.