Saturday, February 22, 2014

Password Settings objects (PSOs)


Step 1: Create a PSO

35 out of 43 rated this helpful - Rate this topic
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=.
  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 PrecedenceGreater than 010
    msDS-PasswordReversibleEncryptionEnabled Password reversible encryption status for user accountsFALSE / TRUE (Recommended: FALSE)FALSE
    msDS-PasswordHistoryLength Password History Length for user accounts0 through 102424
    msDS-PasswordComplexityEnabled Password complexity status for user accountsFALSE / TRUE (Recommended: TRUE)TRUE
    msDS-MinimumPasswordLength Minimum Password Length for user accounts0 through 2558
    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 accounts0 through 6553510
    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
ldifdeSpecifies a utility program that supports batch operations that are based on the LDIF file standard.
-iSpecifies that Import Mode is turned on.
-f pso.ldfSpecifies the name of the input file that you created.

No comments:

Post a Comment