Microsoft Active Directory Import (AD Import) is the most common mechanism for many customers to bring resources like Computers and Users from their AD.
Few things to know about AD Import:
–Import from complex cross-domain scenarios
–Import from different types of security groups from a trusted domain
–Added functionality to additionally attempt to import from AD forest root
–Import of resources containing special characters from different containers
–UI option to select partial or full update of specific data class values allowing better synchronization with AD data.
–“Only if resource” – in this drop-down you can select “Any”, “Managed” or “Unmanaged”. Based on this setting, the data class will be populated or updated only for the corresponding computers (managed by the NS, not managed by the NS or every computer regardless of it being managed or not)
–“Treat data as Full update” – if this check-box is ticked, then during Update Import data class values for existing resources will be overwritten by the data from AD. If the check-box is not ticked, then during Update Import the DC data for existing resources will be preserved – this is the default behavior and the one present in previous ITMS releases. Note that this only applies for Update Import, Data Class values will always be overwritten when Full Import is run
–Server/Domain to Import from
–Container Type, eg. OUs, Distribution Groups, Security Groups,
–Credentials
–Resource Type, Column Mappings
–Schedule Information
–Each entry in AD has a property called uSNChanged, which is a 64-bit number (the code that will increment as changes are made to the AD User account).
–DirectoryItemMap
–Evt_Directory_Import_Status
–Aex_AC_Location
–Inv_Ou_Membership
–Inv_Import_Rule_Imported_Items
–Inv_Global_Active_Directory_Results
–TaskManager
–ResourceUpdateSummary
–Error messages
–Areas of failure
–Specific steps to cause the issue
<!-- Allow to delete collections, which objects were not found in AD import. 0 = don't allow, 1 = allow -->
<customSetting key="ADDeleteLeftoverCollections" type="local" value="0" />
–This is about filters – if filter is gone, we can leave it in NS: with [X] prefix in name, or delete entirely if setting is “1”
<!-- Suppress intensive profile messages of collection updates. 0 = don't suppress, 1 = suppress -->
<customSetting key="ADSuppressCollectionUpdateTrace" type="local" value="1" />
–Extra verbosity setting to produce/suppress more traces when processing collections.
<!-- AD import will force data processor doing auto-enqueue, if idled for some time and has data in the queue buffer. 0 = OFF -->
<customSetting key="ADAutoEnqueueSeconds" type="local" value="0" />
–When import is long and slow, we don’t “batch” for 100 (or so, default value) resources discovered in AD, but build NSE of any amount, collected due to the time. For example, when we import fast and get 100 – we batch it out into NSE generator, but when we are slow and found only 10 resources in 1 hour, we can set to “enqueuer” every 10 seconds – might be 1-2 resources, but we do it.
<!-- How AD import will update scopes on partial import. 0 = only new scopes will be created, 1 = full update will be performed (slower) -->
<customSetting key="ADScopesUpdate" type="local" value="0" />
–The comment is quite explanatory for this one.
<!-- Force membership cleanup prior to full import. This could be slow and while import goes, old resource membership is not available, which is quite bad for roles and accounts. -->
<customSetting key="ADPreDeleteMembership" type="local" value="0" />
–Don’t touch this one! There was always too much of an issue when AD import did “cleanup” of the current mappings/memberships before importing, so it’s legacy stuff…
<!-- Deliver NSEs in the way, they are sequenced by each rule and will not run in parallel. This will help to avoid deadlocks, 0=OFF, 1=ON -->
<customSetting key="ADEnsureNseSequence" type="local" value="0" />
–NSE processing can either: process AD data NSE’s in parallel or sequentially. Parallel is faster, but can bring some deadlocks on heavy loaded system. If you experience too much deadlocks – you can make it “1” and ensure the AD NSE’s to be worked out sequentially. It will be longer, but less pressure to the DB.
How to collect the NSEs generated for the AD Import and extra information for the AD Import process:
Also:
4/8/2022 7:25:04 AM |
RoleAccountMembership |
||
Processed 219 previously known memberships, changes: joins=0, leaves=207, known=219, unchanged=0, rule=d749ca3e-ef02-43e5-b55e-ef0bb8bf8adf |
|||
4/8/2022 7:25:01 AM |
RolesAndAccounts |
||
[2/3] Building preimport directory map from 12 discovered containers in ‘domain.com' (rule: {D749CA3E-EF02-43E5-B55E-EF0BB8BF8ADF}) |
|||
4/8/2022 7:25:01 AM |
LDAPExporter::GetDirectoryDataFromGroups |
||
Importing directory group members from server: ‘MyServer-DC01.example.com' (rule: {D749CA3E-EF02-43E5-B55E-EF0BB8BF8ADF}) |
The following is an example of usual NS log entries for the AD Import process:
Task is starting... (rule: {D749CA3E-EF02-43E5-B55E-EF0BB8BF8ADF})
-----------------------------------------------------------------------------------------------------
Process: AeXSvc (1560), Thread ID: 141, Module: AeXSVC.exe
Priority: 4, Source: DirectoryImportTask::DoDirectoryImportTask
Configuring import rule {D749CA3E-EF02-43E5-B55E-EF0BB8BF8ADF}, server=example.com, type=AD
-----------------------------------------------------------------------------------------------------
Process: AeXSvc (1560), Thread ID: 141, Module: AeXSVC.exe
Priority: 4, Source: DirectoryImportSettings::ConfigureImportRule
[1/3] Discovering import tree from: symantec.com (rule: {D749CA3E-EF02-43E5-B55E-EF0BB8BF8ADF})
-----------------------------------------------------------------------------------------------------
Process: AeXSvc (1560), Thread ID: 268, Module: AeXSVC.exe
Priority: 4, Source: DirectoryItemImporter:DiscoverTree
[2/3] Building preimport directory map from 11 discovered containers in ‘example.com' (rule: {D749CA3E-EF02-43E5-B55E-EF0BB8BF8ADF})
-----------------------------------------------------------------------------------------------------
Process: AeXSvc (1560), Thread ID: 268, Module: AeXSVC.exe
Priority: 4, Source: RolesAndAccounts
Processed 11 previously known memberships, changes: joins=0, leaves=0, known=11, unchanged=11, rule=d749ca3e-ef02-43e5-b55e-ef0bb8bf8adf
-----------------------------------------------------------------------------------------------------
Process: AeXSvc (1560), Thread ID: 268, Module: AeXSVC.exe
Priority: 4, Source: RoleAccountMembership
Loaded roles and accounts: total=11 in 00:00:00.2968950, speed=37 i/s, rule={D749CA3E-EF02-43E5-B55E-EF0BB8BF8ADF}
-----------------------------------------------------------------------------------------------------
Process: AeXSvc (1632), Thread ID: 57, Module: AeXSVC.exe
Priority: 4, Source: SecureDataProcessor
Loaded roles and accounts: total=100 in 00:00:03.8600602, speed=25 i/s, rule={D749CA3E-EF02-43E5-B55E-EF0BB8BF8ADF}
-----------------------------------------------------------------------------------------------------
Process: AeXSvc (1632), Thread ID: 21, Module: AeXSVC.exe
Priority: 4, Source: SecureDataProcessor
Completed importing 111 resources from groups.
-----------------------------------------------------------------------------------------------------
Process: AeXSvc (1632), Thread ID: 62, Module: AeXSVC.exe
Priority: 4, Source: LDAPExporterThread
Resource import has completed for rule: {D749CA3E-EF02-43E5-B55E-EF0BB8BF8ADF}
-----------------------------------------------------------------------------------------------------
Process: AeXSvc (1632), Thread ID: 62, Module: AeXSVC.exe
Priority: 4, Source: DirectoryImporter
************** Directory Import Id {D749CA3E-EF02-43E5-B55E-EF0BB8BF8ADF} has completed creating items and NS messages for data loading. Note: not all exported resources will appear in the NS console until the NS has completed loading all the data from the exported NS messages.
-----------------------------------------------------------------------------------------------------
Process: AeXSvc (1632), Thread ID: 62, Module: AeXSVC.exe
Priority: 4, Source: DirectoryImporter
If you have the Verbose level on NS logs while doing AD Import, you should also see what is the LDAP query used to bring the desired resources:
AD Search: GcBatchedPreloadThreadEntry.LoadMembers
root: GC://AM.example.com
batch: domain=DC=AM,DC=example,DC=com, count=7
filter: (&(|(objectCategory=user)(objectCategory=person)(objectCategory=inetOrgPerson)(objectCategory=foreignSecurityPrincipal))(|(memberOf=CN=LLY_AltirisSWDAdminsP,OU=Universal Groups,OU=Groups,DC=AM,DC=domain,DC=com)(primaryGroupID=685302)(memberOf=CN=LLY_AltirisReportsUsersR,OU=Universal Groups,OU=Groups,DC=AM,DC=domain,DC=com)(primaryGroupID=685310)(memberOf=CN=LLY_AltirisReportsAdminsP,OU=Universal Groups,OU=Groups,DC=AM,DC=domain,DC=com)(primaryGroupID=685304)(memberOf=CN=LLY_AltirisRDMUsersR,OU=Universal Groups...
properties(10): objectGUID, objectClass, uSNChanged, objectSid, primaryGroupID, distinguishedName, memberOf, displayName, mail, sAMAccountName
-----------------------------------------------------------------------------------------------------
Tick Count: 522231859 (6.01:03:51.8590000), Size: 1019 B
Process: AeXSvc (1344), Thread ID: 101, Module: AeXSVC.exe
Priority: 16, Source: GcBatchedPreloadThreadEntry
File: C:\ProgramData\Symantec\SMP\Logs\a.log
NS log example when resources are removed:
NS log example when resources remain:
[2/3] Building preimport directory map from 12 discovered containers in ‘exampleDC2.com' (rule: {D749CA3E-EF02-43E5-B55E-EF0BB8BF8ADF})
-----------------------------------------------------------------------------------------------------
Source: RolesAndAccounts
-----------------------------------------------------------------------------------------------------
Source: RoleAccountMembership
Use case:
Customer noticed that some computers are not been placed in the proper OU filters after they did an AD Import. The computer is present in the Manage>Computers and the AD Import Reports showed that these machines were imported by that AD Import Rule.
What to collect?
Go to coreSettings.config (under c:\programdata\symantec\smp\settings) or from the SMP Console>Notification Server>Core Setting
Search for "ADSaveDiscoveryResults" and change the value from '0' to '3'. Save change.
Please enable the 'Ultra' log mode for the Altiris Log Viewer: Go to Options>Extended Verbosities>SMP Core>Common tab>Active Directory. Set to Ultra. Save.
Run the Computer AD Import rule and let it finish and try to duplicate the issue.
Change back "ADSaveDiscoveryResults" to its default value (which is '0'). As well as remove the extra logging.
Go to C:\ProgramData\Symantec\SMP\ and find "DirectoryServices" folder. Zip the folder and review what is been populated.
What to check?