Understanding Group Policy Processing

Like Active Directory itself, Group Policy also has a client-server architecture. Group Policy clients use client-side extensions (CSEs) for Group Policy to process policy settings. Group Policy servers use server-side extensions to manage policy.

Examining Client-Side Extension Processing

Client-side extensions (CSEs) are implemented as DLLs that are installed with the operating system. The Group Policy Engine running on a client triggers foreground policy processing when a computer is started or a user logs on. The architecture of Group Policy processing is shown in Figure 13-8.

Group Policy processing architecture

Figure 13-8. Group Policy processing architecture

CSEs are called by the Group Policy Engine, and they in turn read each GPC and GPT of a GPO that applies to determine what policy settings to apply to a given computer or user. The CSE makes the actual changes (for example, registry changes, security changes, software installation) that are specified within the GPOs that are processed by the user or computer.

The CSE DLLs are installed with Windows in the %Windir%System32 folder on a standard Windows Server 2003 installation. Third parties can also write custom CSEs that provide additional Group Policy functionality. The installed CSEs for a given Windows computer are registered under the following registry key:

HKEY_LOCAL_MACHINESoftwareMicrosoftWindows NTCurrentVersionWinlogonGPExtensions

Each CSE is stored under a GUID-named key within this registry key. The GUID refers to the particular CSE. This GUID is the same across all Windows–based systems. For example, the CSE for Software Installation has the same GUID regardless of which system it is installed on. If you look at the contents of one of these keys using the Registry Editor (regedit.exe), you will see a set of values that describes the policy capability that the CSE is implementing and the name of the DLL that is implementing that policy, as shown in Figure 13-9.

Viewing the contents of a CSE registry key

Figure 13-9. Viewing the contents of a CSE registry key

As you can see in the figure, a number of values relate to how this CSE processes policy, such as NoSlowLink and NoBackgroundPolicy (as discussed later in this chapter). Table 13-5 lists the CSEs that are installed with Windows Server 2003 Service Pack 1 along with the DLL that implements that functionality.

Table 13-5. Client-Side Extensions Installed with Windows Server 2003 SP1

CSE GUID

DLL Name of CSE

Policy Functionality

{0ACDD40C-75AC-47abBAA0-BF6DE7E7FE63}

Gptext.dll

Wireless Networking policy

25537BA6-77A8-11D2-9B6C-0000F8080861}

Fdeploy.dll

Folder Redirection policy

{35378EAC-683F-11D2-A89A-00C04FBBCFA2}

Userenv.dll

Administrative Templates policy

3610eda5-77ef-11d2-8dc5-00c04fa31a66}

Dskquota.dll

Disk Quota policy (found within Administrative Templates policy)

{426031c0-0b47-4852-b0caac3d37bfcb39}

Gptext.dll

QoS Packet Scheduler policy (found within Administrative Templates policy)

{42B5FAAE-6536-11d2-AE5A-0000F87571E3}

Gptext.dll

Scripts policy (both computer and user scripts)

{4CFB60C1-FAA6-47f1-89AA-0B18730C9FD3}

Iedkcs32.dll

Internet Explorer zone-mapping policy (part of Administrative Templates policy)

{827D319E-6EAC-11D2-A4EA-00C04F79F83A}

Scecli.dll

Security policy

{A2E30F80-D7DE-11d2-BBDE-00C04F86AE3B}

Iedkcs32.dll

Internet Explorer Maintenance policy

{B1BE8D72-6EAC-11D2-A4EA-00C04F79F83A}

Scecli.dll

EFS Recovery policy (part of Public Key policy)

{c6dc5466-785a-11d2-84d0-00c04fb169f7}

Appmgmts.dll

Software Installation policy

{e437bc1c-aa7d-11d2-a382-00c04f991e27}

Gptext.dll

IP Security policy

You will notice in the table that several policy areas share the same CSE, while others implement a separate CSE even though they are part of another CSE’s policy namespace. For example, QoS Packet Scheduler policy uses its own CSE even though this policy appears within Administrative Templates policy (for exampl, QoS Packet Scheduler policy is under the Computer ConfigurationAdministrative TemplatesNetworkQoS Packet Scheduler namespace). Also note that Administrative Templates policy does not have its own standalone CSE DLL, but instead is implemented as part of the core Group Policy Engine (Userenv.dll).

Examining Server-Side Extension Processing

Server-side extensions to Group Policy are used to manage policy implementation and enforce policy rules. When you configure policy settings, you primarily work with the management interfaces to these server-side extensions. Each server-side extensions is managed via a set of MMC snap-ins that provide a policy editing user interface and a mechanism for storing Group Policy settings.

Table 13-6 lists the complete set of MMC snap-ins used for Group Policy editing and their associated DLLs. The snap-ins available in Windows Server 2003 SP1 and the name of the DLL that implements the snap-in can be found in the Windows registry under:

HKEY_LOCAL_MACHINESoftwareMicrosoftMMCSnap-ins

Table 13-6. MMC Snap-Ins Used for Group Policy Editing

Policy Editing Functionality

MMC Snap-in DLL Name

Administrative Templates and Scripts (computer and user)

Gptext.dll

Software Installation

Appmgr.dll

Wireless Network Policy

Wlsnp.dll

Public Key Policy

Certmgr.dll

Security Policy

Wsecedit.dll

Folder Redirection Policy

Fde.dll

Software Restriction Policy

Certmgr.dll

Internet Explorer Maintenance Policy

Ieaksie.dll

IP Security Policy

Ipsecsnp.dll

Note

Note

Generally speaking, the policy editing snap-ins are registered when you install Windows and run the Group Policy Object Editor the first time. Not all the snap-ins listed are always available either. For example, many security settings don’t appear when editing local policy. Others may be intentionally not included in the policy set at various times.

Tip

Tip

On rare occasions, a particular policy area might be missing from the editor namespace. In that case, you can reregister the DLL that implements that policy area, and it should re-appear the next time you load the Group Policy Object Editor. To reregister a snap-in, type regsvr32 <snap-in DLL name> at a command prompt. You will receive a message either confirming that the registration succeeded or telling you that it failed.

Note

Note

Strictly speaking, however, reregistration is rarely needed. The Group Policy Object Editor handles the reregistration if it is necessary the next time you run the editor after policy has been fully refreshed.

When you use the Group Policy Object Editor to modify a GPO, these MMC snap-ins are doing the actual work. While most policy data is stored within the GPT, some policy data is stored within the GPC. Additionally, some extensions, such as IPSec, store their policy information completely outside both structures.

The sections that follow take an in-depth look at how each policy area stores its policy settings within either the GPC or GPT (or, in some cases, both).

Note

Note

Wondering why most but not all policy data is stored within the GPT? The GPT is provided as a location for Group Policy extensions to store and write their data, but there is no requirement for them to do so. As such, the developers of Group Policy extensions might decide to write their data external to the GPT, such as in Active Directory.

Setting Storage for Wireless Network Policy

Wireless Network policy stores its settings within the GPC for a given GPO. Specifically, a new container structure is created under the GPC container in Active Directory with the path of CN=Wireless,CN=Windows,CN=Microsoft. Within the CN=Wireless container, a new object of class msieee80211-Policy is created that holds the Wireless Network policy settings that you specify.

Setting Storage for Folder Redirection Policy

Folder Redirection policy is stored in the GPT for a given GPO and specified within a file called Fdeploy.ini. The Fdeploy.ini file contains the policy details. For example, if you configure redirection for the My Documents folder so that it points to the user’s home directory, the Fdeploy.ini file is created or updated to include the related settings, as shown here:

[FolderStatus]
My Documents=11
My Pictures=2
[My Documents]
s-1-1-0=\%HOMESHARE%%HOMEPATH%
[My Pictures]

In this example, the [FolderStatus] section tells the CSE what to do with the My Documents folder if redirection no longer applies. It also tells the CSE what to do about the My Pictures folder underneath My Documents. The values of these keys change as you choose different options within the Folder Redirection policy. The [My Documents] section lists the redirection that is taking place. Because we are specifying basic redirection, it specifies that the SID S-1-1-0, which indicates the Everyone group, should be redirected to the user environment variables that point to the user’s specified home directory when they log on.

When the Folder Redirection CSE is processed, the contents of Fdeploy.ini are cached on the workstation within the user’s profile, along with another file containing information about the redirected folders prior to redirection. These files are found in %UserProfile%Local SettingsApplication DataMicrosoftWindowsFile Deployment. Typically, this folder contains two .ini files—one called {0E35E0EC-FD6D-4CEF-9267-6EDB00694026}.ini, which contains the cached folder redirection instructions from Fdeploy.ini, and one called {25537BA6-77A8-11D2-9B6C-0000F8080861}.ini, which contains information about all possible redirected folders (such as Desktop, Start Menu, and so on), including the GUID of the GPO that is currently responsible for any redirection that is taking place.

Setting Storage for Administrative Templates Policy

Administrative Templates policy is stored within the GPT in a file called registry.pol. When both per-computer and per-user Administrative Templates policy is specified within a GPO, there will be a registry.pol file under both the Machine and User folders within the GPT. Registry.pol files are text files, but you cannot edit them manually because they contain some special characters and follow a precise format.

Setting Storage for Disk Quota Policy

Because Disk Quota policy is a subset of Administrative Templates policy, the settings for this policy area are stored within the registry.pol file, just as with Administrative Templates policy. Because Disk Quota policy is available only per computer, the registry.pol file containing these policy settings is found only under the Machine folder within the GPT.

Setting Storage for QoS Packet Scheduler Policy

As with Disk Quota policy, QoS Packet Scheduler policy has its own CSE to process policy settings, but QoS Packet Scheduler policy is a subset of Administrative Template policy. The settings for this policy area are stored within the registry.pol file, just as with Administrative Templates policy.

Setting Storage for Scripts

Scripts policy encompasses both startup/shutdown and logon/logoff scripts. Both are stored within the GPT. Shutdown and startup scripts are found within the Machine subfolder of the GPT (in a scriptsshutdown or scriptsstartup folder, respectively). Logon and logoff scripts are found within the User subfolder of the GPT (in a scriptslogon or scriptslogoff folder, respectively).

When you configure scripts, you specify where they are located and any parameters that should be passed to the scripts when they are run. References to the scripts that you specify are stored in a file called Scripts.ini within the GPT. This file is located within the machinescripts or userscripts folder, depending on whether the policy describes per-computer or per-user scripts. The file contains references to the defined scripts and any parameters that are passed to them. When the Scripts CSE runs, information about which scripts need to be executed is stored within the registry. For per-computer scripts, the registry location is:

HKEY_LOCAL_MACHINESoftwarePoliciesWindowsSystemScripts

For per-user scripts, the registry location is:

HKEY_CURRENT_USERSoftwarePoliciesWindowsSystemScripts

When it comes time to actually execute the script, the path to the script is read from one of these two registry locations.

Setting Storage for Internet Explorer Maintenance Policy

Internet Explorer Maintenance policy is stored within the GPT in the UserMicrosoftIEAK folder. The actual settings are stored in a file called install.ins. In addition, there might be a Branding folder within the IEAK folder that holds any custom bitmaps, icons, or other files that are specified within the Internet Explorer Maintenance policy.

When the Internet Explorer Maintenance CSE processes this policy, the install.ins file and any related folders and files under the Branding folder are downloaded and cached within the user’s profile under %UserProfile%Application DataMicrosoftInternet ExplorerCustom Settings. From here, they are processed and applied to the Internet Explorer configuration.

Table 13-7 shows where each of the Internet Explorer Maintenance policy areas stores its settings within the GPT.

Table 13-7. Internet Explorer Maintenance Policy File Locations

Setting

Policy File Location

Browser Title

Install.ins

Custom Bitmaps

Install.ins

BrandingLogo<<small logo file name>>

BrandingLogo<<big logo file name>>

BrandingAnimbmp (empty folder created)

Toolbar Customization

Install.ins

BrandingBtoolbar<<color logo file name>>

BrandingBtoolbar<<grayscale logo file name>>

BrandingToolbmp<<toolbar bmp file name >>

Connection Settings

Install.ins

Brandingcsconnect.set

Brandingcscs.dat

Automatic Browser Configuration

Install.ins

Proxy Settings

Install.ins

User Agent String

Install.ins

Favorites and Links

Install.ins

Important URLs

Install.ins

Security Zones

Install.ins

Brandingonesseczones.inf

Brandingonesseczrsop.inf

Content Ratings

Install.ins

BrandingRatings atings.inf

BrandingRatings atrsop.inf

Authenticode Settings

Install.ins

BrandingAuthcodeauthcode.inf

Programs

Install.ins

BrandingProgramsprograms.inf

Corporate Settings (in Preference mode only)

BrandingAdminetcorp.adm

BrandingAdminetcorp.inf

Internet Settings (in Preference mode only)

BrandingAdminetset.adm

BrandingAdminetset.inf

Setting Storage for Security Policy

Security policy is stored within the GPT in the MachineMicrosoftWindows NTSecEdit folder. Within this folder, a file called GptTmpl.inf is created to store policy settings. Not all security policy is stored within this file, however. Specifically, policies found within Computer ConfigurationWindows SettingsSecurity Settings and including Local Policies, Event Log, Restricted Groups, System Services, Registry and File System are stored in GptTmpl.inf. The settings in Account Policies are stored in the LSA database. Software Restriction settings are written to Registry.pol. IP Security policies are written to Active Directory.

If you open GptTmpl.inf in Notepad, you will see that the file has the same format as the Security Configuration and Analysis templates that you can create and apply outside of Group Policy. This is because Group Policy uses the same SecEdit engine to process Security policy as it does to process Security Configuration and Analysis templates.

When the Security Policy client CSE, Scecli.dll, processes security policy, it copies the GptTmpl.inf file to the computer’s local hard drive and processes the policy from there. The standard location to which GptTmpl.inf is copied is the %Windir%security emplatespolicies folder.

Because a computer can have multiple security policies from multiple GPOs, a series of temporary files is created within the %Windir%security emplatespolicies folder. These temporary files represent each GPO’s security policy settings and are numbered sequentially starting with Gpt00000.dom. Further, because some security policies, such as Account and Kerberos policy, can be applied only to the domain when found in a domain-linked GPO, these policies are downloaded to a special file with a .dom extension. This ensures that all domain controllers process only this domain-linked policy for these special policy settings.

Setting Storage for Software Installation Policy

Software Installation policy is a policy area that uses both the GPC and GPT to store its settings. Within the GPT under the Machine (or User) folder, an Applications folder is created with an Application Assignment Script file (.aas file). The .aas file is specific to the application, its MSI file, and the network path that it has been deployed from. The GPC portion of Software Installation policy is stored within the corresponding Machine (or User) container in the CN=Packages,CN=Class Store container within the GPC. For each application deployed within the GPO, there is packageRegistration object within the Packages container.

Each packageRegistration object contains information about the application that has been deployed. Some of the more interesting attributes on this object are:

  • msiFileList. Stores the paths to the MSI file that this application uses, as well as the path to any files that modify this installation, such as .mst transform files.

  • msiScriptNameStores the deployment state of the application—P for Published, A for Assigned, or R for Removed. Note that the packagRegistration object for a removed application does not get deleted, but instead remains within the GPC indefinitely.

  • msiScriptPath. Stores the file path to the .aas file associated with this application—as it is stored in the SYSVOL.

  • packageName. Stores the friendly name of the application being deployed.

Note

Note

Because the path to the MSI file is embedded in both the GPC and GPT portions of a Software Installation policy, you cannot change the path of an application once it has been deployed without redeploy the application. As discussed in Chapter 9, it’s best to use DFS paths when deploying application packages for this very reason.

Setting Storage for IP Security Policy

Unlike other areas of policy, details about IP Security policy are stored in a different part of Active Directory than the GPC. You’ll find IP Security Policy in the CN=IP Security,CN=System container within the domain naming context. This means you access it in ADSI Edit by connecting to the domain naming context, double-clicking the domain node, such as DC=cpandl,DC=com, expanding CN=System, and then selecting CN=IP Security (Figure 13-10).

Viewing IPSec policy objects within the CN=IP Security, CN=System container

Figure 13-10. Viewing IPSec policy objects within the CN=IP Security, CN=System container

When an IPSec policy that has been created in a domain and stored in Active Directory is assigned to a GPO, a container is created within the GPC to hold that association.

Specifically, within the CN=Windows,CN=Microsoft,CN=Machine container under the GPC, an object of class ipsecPolicy is created to hold the reference to the IPSec policy that is associated with that GPO. The reference to the IP Security policy itself is stored within the ipsecOwnersReference attribute on this ipsecPolicy object, and it contains the DN of the IP Security Policy object within the CN=IP Security container.

Understanding Policy Processing Events

Two types of policy processing can occur: foreground processing and background processing. Foreground processing occurs at computer startup and at user logon. Foreground processing is unique because it typically occurs before the user is able to interact with his desktop, so it is well suited for certain kinds of policy processing that need a "user-free" environment.

Background processing occurs periodically and by definition asynchronously with any other processes for both the computer and user. Background processing is useful for policy that might need to be reapplied periodically, such as Security Settings policy or Administrative Templates policy. Background processing for member servers and workstations occurs every 90 minutes, plus a random amount up to a 30 minute skew factor. Background processing for domain controllers occurs every 5 minutes.

The background processing interval, and the skew factor, can be modified. To do this, you use the following policies:

  • Group Policy Refresh Interval For Computers under Computer ConfigurationAdministrative TemplatesSystemGroup Policy

  • Group Policy Refresh Interval For Domain Controllers under Computer ConfigurationAdministrative TemplatesSystemGroup Policy

  • Group Policy Refresh Interval For Users under User ConfigurationAdministrative TemplatesSystemGroup Policy

You can set both the update interval and the skew factor for each of these, as discussed in Chapter 3. As we mentioned, foreground processing allows Group Policy to perform system changes without the user involvement. In Windows 2000, foreground processing of Group Policy always happened synchronously—that is, policy for a computer was processed before the logon screen appeared for the user, and policy for a user was processed before the desktop was presented to the user. Windows XP Professional introduced the possibility of asynchronous foreground processing, which is supported using the "fast logon optimization" mechanism.

Fast logon optimization essentially means that Windows does not wait for the network stack to initialize before starting up and letting the user log on. Thus, with fast logon optimization enabled, foreground processing of Group Policy need not wait until the network is available. You can disable fast logon optimization by enabling Always Wait For The Network At Computer Startup And Logon under Computer ConfigurationAdministrative TemplatesSystemLogon.

Windows Server 2003 does not support fast logon optimization, so foreground processing always runs synchronously.

Note

Note

You can also trigger a background refresh of Group Policy manually using the gpupdate utility. Gpupdate essentially mimics the processes that happen during a normal background refresh of Group Policy. See "Refreshing Group Policy Manually" in Chapter 3 for details.

Asynchronous vs. Synchronous Policy Processing

Its important to understand how policy processing differs during foreground and background processing cycles and how asynchronous and synchronous processing can affect that. For instance, Software Installation and Folder Redirection policy can be applied only during a foreground, synchronous policy processing event. This means that, for example, if fast logon optimization is enabled on a computer running Windows XP Professional, it will take two user logons for Software Installation and Folder Redirection policy changes to be processed completely. Similarly, certain policy areas aren’t processed at all during background refresh, while others are processed but don’t necessarily run.

Table 13-8 lists when each CSE will run during policy processing. Note that with Scripts policy, synchronous and asynchronous behavior can be modified. See "Controlling Script Execution and Run Technique" in Chapter 7 for details.

Table 13-8. CSE Foreground and Background Processing Support

CSE

Runs During Foreground Synchronous

Runs During Foreground Asynchronous

Runs During Background (Asynchronous)

Wireless Networking

Yes

Yes

Yes

Folder Redirection

Yes

No

No

Administrative Template

Yes

Yes

Yes

Disk Quota

Yes

Yes

Yes

QoS Packet Scheduler

Yes

Yes

Yes

Scripts

*

*

*

Internet Explorer Maintenance

Yes

Yes

Yes

Security

Yes

Yes

Yes*

EFS Recovery

Yes

Yes

Yes

Software Installation

Yes

No

No

IP Security

Yes

Yes

Yes

Note

Note

Security policy can be applied to a machine during background refresh. However, some security policy settings may not take effect without a reboot. Additionally, some of the CSEs listed in Table 13-8 apply only to the user or to the computer, so background asynchronous processing might mean something different for each. For example, if no user is logged on to a computer, no user-specific background processing occurs.

Tracking Policy Application

Now let’s look at the actual Group Policy processing process. We’ll look at the flow of two different scenarios. In the first scenario, we’ll look at what happens during each step of foreground policy processing during computer startup and when a user logs on. During startup, the following events take place:

  1. The computer finds a domain controller and authenticates itself in Active Directory. (The same process occurs when a user logs on to Active Directory because a computer is just a special instance of a user account.) To perform this authentication, a series of protocols must be successfully passed over the network, including UDP port 53 (DNS), UDP and TCP port 389 (LDAP), TCP port 135 (RPC Portmapper), and UDP port 88 (Kerberos).

  2. The computer performs an ICMP ping to the domain controller to determine whether it is connected via a slow link to the domain controller.

  3. The computer queries Active Directory using LDAP to determine which GPOs are linked to the OU(s), domain, and site to which the computer belongs. From these queries, it builds a list of distinguished names for all of the GPOs that apply to the computer.

  4. The computer queries Active Directory using LDAP. It sends as the query filter the list of all GPOs found in step 3 and requests a number of attributes for them, including the path to the GPT, the version number of the GPC, and the gpCMachineExtensionNames and gpCUserExtensionnames attributes. These attributes contain a list of CSE GUIDs that are implemented within the GPO.

    Note

    Note

    The Windows operating system uses the results of this query to determine which CSEs need to be called and which ones don’t when it comes time to process a particular GPO. This optimizes Group Policy processing performance.

  5. The Windows operating system uses TCP Port 445 (SMB) to connect to the SYSVOL share and reads the Gpt.ini file out of each GPO found in step 3. The core Group Policy engine then hands off processing of policy to the CSEs that need to be called (found in step 4).

  6. As Group Policy processing begins, each CSE compares the version number of the GPOs that it needs to process with those stored on the computer in its Group Policy history and state keys. (More on these later, in the "Understanding Group Policy History and State" section.)

  7. If a GPO’s version number has not changed since the last time it was processed in either foreground or background processing, it is skipped. In addition, if one or more GPOs have been deleted from the list of GPOs to process since the last time Group Policy processing occurred, that is considered a change and the CSE will remove any related policy settings.

    Note

    Note

    The rule about GPOs not being processed unless their version number has changed is always true unless you modify the behavior of a CSE using Administrative Templates policy (described in the "Modifying CSE Behavior" section in this chapter) or you use the gpupdate/force option.

  8. The CSE checks to make sure it has sufficient permissions to all of the GPOs it is supposed to process. Any GPOs to which it does not have access are dropped from the list. In addition, if you have specified anything that would modify the behavior of Group Policy processing, such as setting a GPO link to Enforced, this is taken into consideration at this time.

    Note

    Note

    When a GPO link is set to Enforced, it is moved to the end of the list of GPOs to process. In that way, it is processed last and always "wins" over conflicting GPOs.

  9. As each CSE runs, it performs the checks described in step 6 and then processes the GPOs by reading the contents of the GPT (or GPC, if needed) using SMB. If the Administrative Templates Policy CSE needs to run, the CSE actually removes all registry values within the predesignated policy keys. The Administrative Templates policy then reapplies any registry policy from the list of GPOs that are processed. Then the next CSE in the list is run. The CSEs run in the order they are registered in the GPExtensions key within the registry, and of course they are called only if the gpCMachineExtensionNames and gpCUserExtensionnames attributes indicate that they need to run.

  10. As each CSE completes its job, it logs RSoP data to WMI in the CIMOM database on the computer where policy is being processed.

  11. When a user logs on, this process is repeated to obtain and process the GPOs that apply to the currently logged on user.

In the second scenario, we’ll look at what happens during each step of background policy processing—when a manual refresh of policy is done using Gpupdate.exe. During a manual refresh, the following events take place:

  1. The Group Policy processing cycle starts with the slow-link detection process. This is repeated, just as in the previous example, for computer startup. If a user is logged on, the slow link detection process is repeated according to the User Configuration settings.

  2. If a user is logged on when gpupdate is run, user processing begins first. The Group Policy client running on the user’s computer queries Active Directory to retrieve the list of GPOs that apply. The same process is completed for the computer account.

  3. Active Directory is queried for information about the GPOs, as discussed previously.

  4. The CSEs process their GPO lists, contacting Active Directory and SYSVOL as needed. Only GPOs that have settings changed since last cached on the client will be processed by default. If a user is logged on, user and computer processing can happen in parallel, and you might have computer processing going on at the same time as user processing.

  5. Each CSE writes RSoP data to WMI on the computer as it completes its processing.

As you can see, the processing of Group Policy in the background is not that different from the steps taken during foreground processing—the same protocols are used, and the same decisions are made along the way, based on whether the user or computer has access to the GPOs, whether the GPOs have changed since the last processing cycle, and so on.

Tip

Tip

To get an inside look at Group Policy processing, you can enable verbose userenv logging on your Windows computers. Other logging is also available to look at specific CSE processing as well. Logging is examined in detail in Chapter 16.

Tracking Slow Link Detection

Because certain CSEs will not process policy if a slow link is detected, troubleshooting policy problems can be difficult. Table 13-9 lists the default behavior of CSEs when a slow link is detected.

Table 13-9. CSE Slow Link Processing Behavior

CSE

Processes on Slow Link?

Security

Yes (and can’t be disabled)

IP Security

Yes

EFS Recovery

Yes

Wireless Network

Yes

Administrative Templates

Yes (and can’t be disabled)

Scripts

No

Folder Redirection

No

Software Installation

No

IE Maintenance

Yes

Using Administrative Templates policy, you can modify the behavior of these CSEs with respect to slow link detection as discussed in Chapter 3. One challenge of slow link detection is that it primarily relies on ICMP network traffic to be available between the computer processing Group Policy and the domain controller from which it receives Group Policy. If ICMP is blocked or restricted, slow link detection will fail. However, perhaps more catastrophically, if ICMP traffic is blocked or restricted, Group Policy processing itself will fail.

Process failure occurs because when the Group Policy client finds that it cannot successfully ping the domain controller that it has been authenticated to, it simply gives up and stops Group Policy processing. If you work in a network that has disabled or restricted ICMP, you must take steps to work around this reliance on ICMP. Specifically, you might want to disable slow link detection altogether, in both Computer Configuration and User Configuration. As discussed in Chapter 3, you disable slow link detection entirely by enabling Group Policy Slow Link Detection under Computer ConfigurationAdministrative TemplatesSystemGroup Policy and User ConfigurationAdministrative TemplatesSystemGroup Policy and then specifying a Connection Speed of 0 Kbps.

Note

Note

Restrictions that affect slow link detection include restricting the packet size of ICMP traffic. Because slow link detection requires sending a data-filled packet of 2048 bytes, if only smaller ICMP packet sizes are allowed on the network, slow link detection and Group Policy processing will still fail.

Of course, if you have already disabled ICMP on your network, you cannot deliver these two policies using Group Policy. In that case, you must manually distribute the corresponding registry changes for these two policies. The following registry values must be delivered to both policies to completely disable slow link detection:

HKEY_LOCAL_MACHINESoftwarePoliciesMicrosoftWindowsSystem
GroupPolicyMinTransferRate = REG_DWORD 0
HKEY_CURRENT_USERSoftwarePoliciesMicrosoftWindowsSystem
GroupPolicyMinTransferRate = REG_DWORD 0

Once this is done, Group Policy processing will no longer perform slow-link detection. All links will be assumed to be fast.

Modifying Security Policy Processing

CSE behavior can vary based on several factors. In general, CSEs will not process a GPO that has not changed since the last time Group Policy was processed. Certain CSEs will not process a GPO if a slow link has been detected. Some CSEs will not process a GPO if the processing event is a background refresh. As discussed in Chapter 3, you can optimize slow link detection and background refresh using policies in the Computer ConfigurationAdministrative TemplatesSystemGroup Policy folder.

One CSE behavior modification you can make that is not available in the Administrative Templates policy is related to security policy processing. By default, the Security Policy CSE processes the related security settings every 16 hours on non-domain controllers and ever 5 minutes on domain controllers, even if these settings have not changed. This mechanism ensures that the important security configuration aspects of Group Policy are reinforced even if no GPO changes have been made. You can reduce or increase this interval as needed by making a registry change. Specifically, the value that controls the processing interval is:

HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindows NTCurrentVersionWinlogonGPExtensions
{827D319E-6EAC-11D2-A4EA-00C04F79F83A}MaxNoGPOListChangesInterval

This value is set to 960 (hex 0x3C0) by default, which is the number of minutes between refreshes. You can adjust this value up or down to modify the interval. To deliver this change to your computers, you can create a custom .adm file that lets you manage this change centrally. For more information on creating custom .adm files, see Chapter 14.

Don’t modify the Security Policy processing interval without careful thought to the impact the change will have on your network. Generally speaking, you should modify the interval only if there is a valid business reason or concern. For example, if you are in a high-security environment with 24/7 operations, you might want Security Policy to be refreshed more often than normal, such as every 12 hours. In this case, you set the Security Policy refresh interval to 720 minutes and set the MaxNoGPOListChanges-Interval value in the registry to 0x2D0 (which is the hex value for 720).

Group Policy History and State Data

On each computer that receives Group Policy, history and state information about the GPOs that were processed is stored in the registry. As part of policy processing, group membership information is also stored. The related registry keys that store this information include:

  • HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindowsCurrentVersionGroup PolicyHistory. Used to store Group Policy history data

  • HKEY_CURRENT_USERSOFTWAREMicrosoftWindowsCurrentVersionGroup PolicyState. Used to store Group Policy state data

  • HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindowsCurrentVersionGroup PolicyGroupMembershipUsed to store group membership information for the computer for which policy was processed

  • HKEY_CURRENT_USERSOFTWAREMicrosoftWindowsCurrentVersionGroup PolicyGroupMembership. Used to store group membership information for users for which policy was processed

These keys and their values are discussed in the sections that follow.

Group Policy History Data

Group Policy history data is stored in the registry under HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindowsCurrentVersionGroup PolicyHistory. One primary use for maintaining history information is to determine whether a GPO being processed has changed since the last time it was processed. For this reason, version information and other details about processed GPOs are stored for later retrieval. Each key under the History key represents the CSE being processed and is named with the GUID of the related CSE. Following this, history data from processing the Administrative Templates CSE is stored in the HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindowsCurrentVersionGroup PolicyHistory{35378EAC-683F-11D2-A89A-00C04FBBCFA2} key.

Organizing the history keys according to the GUID of the related CSE makes it easy to compare the previously processed GPOs. A numerically indexed (0, 1, 2, and so on) list of keys under the CSE keys is used to store information related to the actual GPOs that have been processed during the last processing cycle by that CSE (Figure 13-11). The values stored in these keys include the GPO’s friendly name, its GUID, the path to the GPC and GPT, and most important, the version number of the GPO when it was last processed.

Viewing a GPO’s history within the registry CSE key

Figure 13-11. Viewing a GPO’s history within the registry CSE key

The version information is used to compare the GPO currently being processed to the previously processed one. If the GPO being processed has a version number greater than the one held in the registry, the CSE continues processing the GPO. If the version number is equal to that held in the registry, the CSE stops processing the GPO unless you’ve overridden the default processing behavior for that CSE.

Note

Note

The version number of the GPO about to be processed should never be less than that held in the history key. If it is, that indicates some kind of problem with your Group Policy infrastructure. If a GPO’s version number is 0, it is not processed because it is assumed that there are no policies set on it.

The history information is also important in one other aspect of Group Policy processing that we haven’t covered yet—the notion of the deleted list. Here’s how the deleted list works:

  1. A Windows computer must be able to determine when a GPO that used to apply no longer applies. To do this, it compares the history information in the registry to the current list of GPOs to process.

  2. If some GPOs no longer apply, Windows knows that it might need to undo those policy settings (if the CSE supports such an undo). The GPOs that no longer apply are added to the deleted GPO list.

  3. The CSEs that have responsibility for the deleted GPOs remove the related policy settings. If multiple GPOs for a given CSE no longer apply, the settings are removed in reverse precedence order to preserve the original processing hierarchy.

As an example of how the deleted GPO list is used, consider the following: Folder Redirection policy provides an option that lets you redirect folders back to their original location when the GPO no longer applies. To know that a GPO no longer applies, the Folder Redirection CSE has to build a deleted GPO list before processing policy. If it didn’t do this, folders would never be redirected back to their original location.

Group Policy State Data

Group Policy state data is stored in the registry under HKEY_CURRENT_USERSOFTWAREMicrosoftWindowsCurrentVersionGroup PolicyState. State information is used primarily by RSoP logging to report on certain aspects of the last policy processing cycle. Some of these include whether a slow link was detected during the last processing cycle, the time at which policy processing was last performed, the state of each GPO link, and the state of each GPO that was processed. If you examine the contents of the state keys, you will see that they are arranged in per-computer (under the Machine key) and per-user (under SID-named keys) fashion.

The per-machine and per-user SID keys have three subkeys in common:

  • Extension-List

  • GPLink-List

  • GPO-List

The Extension-List key usually contains a sub-key called {00000000-0000-0000-0000-000000000000}. This all-zero GUID stands for the core Group Policy Engine. Within this key, you will see values that list when the last computer-specific Group Policy processing cycle started and ended (such as, StartTimeLo, StartTimeHi, EndTimeLo, EndTimeHi). Other extension keys typically contain RSoP logging information. The DiagnosticNamespace value lists which namespace was processed for logging, such as \ENGPC07ROOTRsopComputer.

Tip

Tip

The Gptime.exe utility on the companion CD uses this start and stop state information to report the times and duration of the last Group Policy processing cycle.

All linked GPOs that were processed by this machine are listed in the GPLink-List key along with their link status—such as Enabled or Enforced (a.k.a. No Override). The DsPath value provides the DN of the linked GPO, such as cn={9FC124A6-626F-4C4C-9BAE-D75B779D21BF},cn=policies,cn=system,DC=cpandl,DC=com. The SOM value provides the scope of the linked GPO (which level the GPO applies to, such as DC=cpandl,DC=com for a GPO that applies to the domain scope). For the local machine GPO, the DsPath and SOM values are set to LocalGPO and Local, respectively.

Within the GPO-List key, information about each GPO that was processed is stored. The AccessDenied value indicates whether the GPO was skipped because security filtering prevented it from being processed. The GPO-Disabled value indicates whether the GPO was disabled. The Options value details any options that were set on the GPO (for example, whether the Computer Configuration or User Configuration portions of the GPO were disabled). The GPOID value contains the GPO GUID. The GPO-List information is used when reporting on RSoP using a tool such as Gpresult.exe or the GPMC Group Policy Results Wizard.

The per-user SID-named key has two additional sub-keys: Loopback-GPLink-List and Loopback-GPO-List. These subkeys are used when you change the default loopback processing mode. Loopback-GPLink-List contains information on all linked GPOs that were loopback processed, and Loopback-GPO-List contains information on the loopback processed GPOs themselves.

Group Membership Data

Group Policy caches group membership information to track the specific security groups that the computer and the currently logged on user belong to. The membership information is used determine whether and how security filtering will affect the list of GPOs that need to be processed, and because it is so critical, the information is updated each time policy is processed. The membership information is also used to provide output details for Gpresult.exe and the GPMC Group Policy Results Wizard when tracking security or examining security filtering details.

The SIDs for all security groups a computer belongs to are stored under the HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindowsCurrentVersionGroup PolicyGroupMembership key. For any users who have logged on to a computer, a list of the groups they belong to is stored according to their SID under the HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindowsCurrentVersionGroup Policy<SID of user>GroupMembership key.

If you examine the GroupMembership key, you’ll find key values named Group0, Group1, Group2, and so on that contain the SID of the security group to which they relate. You’ll also find a Count value, which provides a count of all the security groups that apply. For example, if four security groups apply, Count has a value of 4 and there are key values named Group0, Group1, Group2, and Group3.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset