Export (0) Print
Expand All

Step 1: Create a PSO

Updated: July 14, 2010

Applies To: Windows Server 2008, Windows Server 2008 R2

You can create Password Settings objects (PSOs):

To create a PSO (fine-grained password policy) using the Active Directory module for Windows PowerShell see, Create a New Fine-Grained Password Policy.

Active Directory Service Interfaces Editor (ADSI Edit) provides a view of every object and attribute in an Active Directory Domain Services (AD DS) forest. You can use ADSI Edit to query, view, and edit AD DS objects and attributes.

Membership in Domain Admins, or equivalent, is the minimum required to complete this procedure. Review details about using the appropriate accounts and group memberships at Local and Domain Default Groups (http://go.microsoft.com/fwlink/?LinkId=83477).

  1. Click Start, click Run, type adsiedit.msc, and then click OK.

    noteNote
    If you are running ADSI Edit for the first time on a domain controller, proceed to step 2. Otherwise, proceed to step 4.

  2. In the ADSI Edit snap-in, right-click ADSI Edit, and then click Connect to.

  3. In Name, type the fully qualified domain name (FQDN) of the domain in which you want to create the PSO, and then click OK.

  4. Double-click the domain.

  5. Double-click DC=<domain_name>.

  6. Double-click CN=System.

  7. Click CN=Password Settings Container.

    All the PSO objects that have been created in the selected domain appear.

  8. Right-click CN=Password Settings Container, click New, and then click Object.

  9. In the Create Object dialog box, under Select a class, click msDS-PasswordSettings, and then click Next.

  10. In Value, type the name of the new PSO, and then click Next.

  11. Continue with the wizard, and enter appropriate values for all mustHave attributes.

    ImportantImportant
    To disable account lockout policies, assign the msDS-LockoutThreshold attribute the value of 0.

    noteNote
    To avoid ADSI Edit errors, values for the four time-related PSO attributes (msDS-MaximumPasswordAge, msDS-MinimumPasswordAge, msDS-LockoutObservationWindow, and msDS-LockoutDuration) must be entered in the d:hh:mm:ss format (recommended) or the I8 format. Note that the d:hh:mm:ss format is only available in the Windows Server 2008 version of ADSI Edit. For more information about how to convert time unit values into I8 values, see "Negative PSO Attribute Values" in Appendix B: PSO Attribute Constraints.

    noteNote
    For more information about time-related PSO attributes, see "PSO Attributes Referential Integrity" in Appendix B: PSO Attribute Constraints.

     

    Attribute name Description Acceptable value range Example value

    msDS-PasswordSettingsPrecedence

    Password Settings Precedence

    Greater than 0

    10

    msDS-PasswordReversibleEncryptionEnabled

    Password reversible encryption status for user accounts

    FALSE / TRUE (Recommended: FALSE)

    FALSE

    msDS-PasswordHistoryLength

    Password History Length for user accounts

    0 through 1024

    24

    msDS-PasswordComplexityEnabled

    Password complexity status for user accounts

    FALSE / TRUE (Recommended: TRUE)

    TRUE

    msDS-MinimumPasswordLength

    Minimum Password Length for user accounts

    0 through 255

    8

    msDS-MinimumPasswordAge

    Minimum Password Age for user accounts

    • (None)

    • 00:00:00:00 through msDS-MaximumPasswordAge value

    1:00:00:00 (1 day)

    msDS-MaximumPasswordAge

    Maximum Password Age for user accounts

    • (Never)

      To set the time to (never), set the value to -9223372036854775808.

    • msDS-MinimumPasswordAge value through (Never)

    • msDS-MaximumPasswordAge cannot be set to zero

    42:00:00:00 (42 days)

    msDS-LockoutThreshold

    Lockout threshold for lockout of user accounts

    0 through 65535

    10

    msDS-LockoutObservationWindow

    Observation Window for lockout of user accounts

    • (None)

    • 00:00:00:01 through msDS-LockoutDuration value

    0:00:30:00 (30 minutes)

    msDS-LockoutDuration

    Lockout duration for locked out user accounts

    • (None)

    • (Never)

    • msDS-LockoutObservationWindow value through (Never)

    0:00:30:00 (30 minutes)

    msDS-PSOAppliesTo

    Links to objects that this password settings object applies to (forward link)

    0 or more DNs of users or global security groups

    “CN=u1,CN=Users,DC=DC1,DC=contoso,DC=com”

    noteNote
    To create a PSO without applying it to any users or global security groups, proceed to step 17. Otherwise, proceed to step 12.

  12. On the last screen of the wizard, click More Attributes.

  13. On the Select which property to view menu, click Optional or Both.

  14. In the Select a property to view drop-down list, select msDS-PSOAppliesTo.

  15. In Edit Attribute, add the distinguished names of users or global security groups that the PSO is to be applied to, and then click Add.

  16. Repeat step 15 to apply the PSO to more users or global security groups.

  17. Click Finish.

    noteNote
    If you receive this error:

    Operation failed. Error code: 0x57

    The parameter is incorrect.

    Check the syntax of the distinguished name of the account. The following characters in the distinguished name need to be escaped with a backslash:

    , \ # + < > ; " =

    For example, cn=Smith\, John,ou=West,dc=contoso,dc=com

You can use the ldifde command as a scriptable alternative for creating PSOs.

LDAP Data Interchange Format (LDIF) is an Internet standard for a file format that you can use to perform batch operations against directories that conform to Lightweight Directory Access Protocol (LDAP) standards. You can use LDIF to export and import data. LDIF performs batch operations such as add, create, and modify against AD DS. When you install the AD DS role, a utility program called LDIFDE is included to support batch operations that are based on the LDIF file standard. For more information, see Using LDIFDE to import and export directory objects to Active Directory (http://go.microsoft.com/fwlink/?LinkId=87487).

Membership in Domain Admins, or equivalent, is the minimum required to complete this procedure. Review details about using the appropriate accounts and group memberships at Local and Domain Default Groups (http://go.microsoft.com/fwlink/?LinkId=83477).

  1. Define the settings of a new PSO by saving the following sample code as a file, for example, pso.ldf:

    dn: CN=PSO1, CN=Password Settings Container,CN=System,DC=dc1,DC=contoso,DC=com
    changetype: add
    objectClass: msDS-PasswordSettings
    msDS-MaximumPasswordAge:-1728000000000
    msDS-MinimumPasswordAge:-864000000000
    msDS-MinimumPasswordLength:8
    msDS-PasswordHistoryLength:24
    msDS-PasswordComplexityEnabled:TRUE
    msDS-PasswordReversibleEncryptionEnabled:FALSE
    msDS-LockoutObservationWindow:-18000000000
    msDS-LockoutDuration:-18000000000
    msDS-LockoutThreshold:0
    msDS-PasswordSettingsPrecedence:20
    msDS-PSOAppliesTo:CN=user1,CN=Users,DC=dc1,DC=contoso,DC=com
    
    noteNote
    When you use ldifde to create PSOs, values for the four time-related PSO attributes (msDS-MaximumPasswordAge, msDS-MinimumPasswordAge, msDS-LockoutObservationWindow, and msDS-LockoutDuration) must be entered in the I8 format. For more information about how to convert time unit values into I8 values, see "Negative PSO Attribute Values" in Appendix B: PSO Attribute Constraints.

    noteNote
    For more information about time-related PSO attributes, see "PSO Attributes Referential Integrity" in Appendix B: PSO Attribute Constraints.

  2. Open a command prompt. To open a command prompt, click Start, click Run, type cmd, and then click OK.

  3. Type the following command, and then press ENTER:

    ldifde –i –f pso.ldf
    

 

Parameter Description

ldifde

Specifies a utility program that supports batch operations that are based on the LDIF file standard.

-i

Specifies that Import Mode is turned on.

-f pso.ldf

Specifies the name of the input file that you created.

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft