Tutorial: How to setup Default and Fine Grain Password Policy

imageOne strange thing that still seems to catch a lot of people out is that you can only have one password policy for your user per domain. This catches a lot of people out as they apply a password policy to an OU in their AD thinking that it will apply to all the users in that OU…. but it doesn’t. Microsoft did introduce Fine Grain Password Policies with Windows Server 2008 however this can only be set based on a security group membership and you still need to use the very un-user-friendly ADSI edit tool to make the changes to the policy.

Below I will go through how you change the default domain password policy and how you then apply a fine grain password policy to your environment. The Good news is setting the default password policy for a domain is really easy. The Bad news is that setting a fine grain password policy is really hard.

Update: If you want to set a password complexity setting that is not supported out of the box of windows then it is possible to install a third-party DLL on you domain controllers to achieve this. However there are many caveats to this and it is best you check out the full explanation at http://blogs.technet.com/b/askds/archive/2011/08/05/friday-mail-sack-beard-seconds-edition.aspx#password

How to set a Default Domain Password Policy

Step 1. Create a new Group Policy Object at the top level of the domain (e.g. “Domain Password Policy”).

image

Note: I have elected to create a new GPO at the top of the domain in this case as I always try to avoid modifying the “Default Domain Policy”, see references below.

Reference

TechNet: Linking GPOs

If you need to modify some of the settings contained in the Default Domain Policy GPO, it is recommended that you create a new GPO for this purpose, link it to the domain, and set the Enforce option.

TechNet: Establishing Group Policy Operational Guidelines

Do not modify the default domain policy or default domain controller policy unless necessary. Instead, create a new GPO at the domain level and set it to override the default settings in the default policies.

Step 2. Edit the “Domain Password Policy” GPO and go to Computer Configurations>Policies>Windows Settings>Security Settings>Account Policy>Password Policy and configured the password policies settings to the configuration you desire.

image

Step 3. Once you have configured the password policy settings make the “Domain Password Policy” GPO the highest in the Linked GPO processing order.

TIP: Make sure you inform all your users when you are going to do this as it may trigger them to change their password the next time they logon.

image

Done… told you it was easy….

Note: Even if you apply the password policies to the “Domain Controllers” OU it will not modify the domain’s password policy. As far as I know this is the only exception to the rule as to how GPO’s apply to objects. As you can see in the image below the “Minimum password length” in the “Domain Password Policy” GPO is still applied to the domain controller even though I have another GPO linking to the “Domain Controllers” OU configuration the same setting.

image

For a better explanation as to why the GPO that is linked to the Domain and not the Domain Controllers is used for the password policy for all users check out Jorge’s Quest for Knowledge! – Why GPOs with Password and Account Lockout Policy Settings must be linked to the AD domain object to be affective on AD domain user accounts

 

How to set a Fine Grain Password Policy

Fine Grain Password Policies (FGPP) were introduced as a new feature of Windows Server 2008. Before this the only way to have different password polices for the users in your environment was to have separate domains… OUCH!

Pre-Requisites/Restrictions

You domain must be Windows Server 2008 Native Mode, this means ALL of your domain controllers must be running Windows Server 2008 or later. You can check this by selection the “Raise domain functional level” on the top of the domain in Active Directory Users and Computers.

image

Reference

AD DS: Fine-Grained Password Policies

The domain functional level must be Windows Server 2008.

The other restriction with this option is that you can only apply FGPP to users object or users in global security groups (not computers).

Reference

AD DS: Fine-Grained Password Policies

Fine-grained password policies apply only to user objects … and global security groups.

TIP: If you setup an “Automatic Shadow Group” you can apply these password policies to users automatically to any users located in an OU.

Creating a Password Setting Object (PSO)

Step 1. Under Administrator Tools Open ADSI Edit and connect it to a domain and domain controller you want to setup the new password policy.

image

Note: If you do not see this option go to “Turn Windows Features On or Off” and make sure the “AD DS and AD LDS Tools” are installed. (You will need RSAT also installed if you are on Windows 7).\

Step 2. Double click on the “CN=DomainName” then double click on “CN=System” and then double click on “CN=Password Settings Container”.

image

Step 3. Right click on “CN=Password Settings Container” and then click on “New” then “Object…”

image

Step 4. Click on “Next”

image

Step 5. Type the name of the PSO in the “Value” field and then click “Next”

image

Note: With the exception of the password length the following values are all the same as the default values in the “Default Domain Policy”.

Step 6. Type in a number that will be the Precedence for this Password Policy then click “Next”.

Note: This is used if a users has multiple Password Settings Object (PSO) applied to them.

image

Step  7. Type “FALSE” in the value field and click “Next”

Note: You should almost never use “TRUE” for this setting.

image

Step 8. Type “24” in the “Value” field and click “Next”

image

Step 9. Type “TRUE” in the “Value” field and click “Next”

image

Step 10. Type “5” in the “Value” field and click “Next”

image

Step 11. Type “1:00:00:00” in the “Value” field and click “Next”

image

Step 12. Type “42:00:00:00” in the “Value” field and click “Next”

image

Step 13. Type “10” in the “Value” field and click “Next”

image

Step 14. Type “0:00:30:00” field and click “Next”

image

Step 15. Type “0:00:33:00” in the “Value” field and click “Next”

image

Step 16. Click “Finish”

image

You have now created the Password Settings Object (PSO) and you can close the ADSIEdit tool.

Now to apply the PSO to a users or group…

Step 17.  Open Active Directory Users and Computers and navigate to “System  > Password Settings Container”

Note: Advanced Mode needs to be enabled.

image

Step 18. Double click on the PSO you created then click on the “Attribute Editor” tab and then select the “msDS-PSOAppliedTo” attribute and click “Edit”

image

Step 19. Click “Add Windows Accounts….” button.

image

Step 20. Select the user or group you want to apply this PSO and click “OK”

image

Step 21. Click “OK”

image

Step 22. Click “OK”

image

And your are done…  (told you it was hard).

Fine Grain Password Policies as you can see are very difficult to setup and manage so it is probably best you use them sparingly in your organisation… But if you really have to have a simple password or extra complicated password then at least it give you away to do this without having to spin up another domain.

Other Useful Links

AD DS: Fine-Grained Password Policies

AD DS Fine-Grained Password and Account Lockout Policy Step-by-Step Guide

Why GPOs With Password And Account Lockout Policy Settings Must Be Linked To The AD Domain Object To Be Affective On AD Domain User Accounts

14 Comments

  1. I am curious. I carefully ran through the settings, really only changing the password length to 8, the password age to 75, and the lockout threshold to 7, keeping all others at the default. When I logon as a user assigned to the security group, I get an “Access Denied” message. I set the password precedence setting to 10, although this is the first custom PSO I am designing. I am at a 2008 R2 Domain Level.

    • I am curious. I carefully ran through the settings, really only changing the password length to 8, the password age to 75, and the lockout threshold to 7, keeping all others at the default. When I logon as a user assigned to the security group, I get an “Access Denied” message *when I try to change the password*. I set the password precedence setting to 10, although this is the first custom PSO I am designing. I am at a 2008 R2 Domain Level.

  2. I apologize for the last message. It appears the test account had the password set to “User cannot change password.” Once that was corrected I found that although I am still having problems getting a group to be associated with the PSO, individual users work fine.

Leave a Reply

Your email address will not be published.

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>