1 .\" $OpenLDAP: pkg/ldap/doc/man/man5/slapo-ppolicy.5,v 1.12.2.7 2008/04/24 08:15:34 hyc Exp $
2 .\" Copyright 2004-2008 The OpenLDAP Foundation All Rights Reserved.
3 .\" Copying restrictions apply. See COPYRIGHT/LICENSE.
4 .TH SLAPO_PPOLICY 5 "2008/07/16" "OpenLDAP 2.4.11"
6 slapo-ppolicy \- Password Policy overlay to slapd
8 /etc/openldap/slapd.conf
14 is an implementation of the most recent IETF Password
15 Policy proposal for LDAP. When instantiated, it intercepts,
16 decodes and applies specific password policy controls to overall
17 use of a backend database, changes to user password fields, etc.
19 The overlay provides a variety of password control mechanisms. They
20 include password aging--both minimum and maximum ages, password
21 reuse and duplication control, account time-outs, mandatory password
22 resets, acceptable password content, and even grace logins.
23 Different groups of users may be associated with different password
24 policies, and there is no limit to the number of password policies
27 Note that some of the policies do not take effect when the operation
30 identity; all the operations, when performed with any other identity,
31 may be subjected to constraints, like access control.
33 Note that the IETF Password Policy proposal for LDAP makes sense
34 when considering a single-valued password attribute, while
35 the userPassword attribute allows multiple values. This implementation
36 enforces a single value for the userPassword attribute, despite
42 configuration options apply to the ppolicy overlay. They should appear
47 .B ppolicy_default <policyDN>
48 Specify the DN of the pwdPolicy object to use when no specific policy is
49 set on a given user's entry. If there is no specific policy for an entry
50 and no default is given, then no policies will be enforced.
52 .B ppolicy_hash_cleartext
53 Specify that cleartext passwords present in Add and Modify requests should
54 be hashed before being stored in the database. This violates the X.500/LDAP
55 information model, but may be needed to compensate for LDAP clients that
56 don't use the Password Modify extended operation to manage passwords. It
57 is recommended that when this option is used that compare, search, and
58 read access be denied to all directory users.
60 .B ppolicy_use_lockout
61 A client will always receive an LDAP
64 Binding to a locked account. By default, when a Password Policy control
65 was provided on the Bind request, a Password Policy response will be
66 included with no special error code set. This option changes the
67 Password Policy response to include the
72 error code provides useful information
73 to an attacker; sites that are sensitive to security issues should not
79 overlay depends on the
81 object class. The definition of that class is as follows:
84 ( 1.3.6.1.4.1.42.2.27.8.2.1
90 pwdMinAge $ pwdMaxAge $ pwdInHistory $
91 pwdCheckQuality $ pwdMinLength $
92 pwdExpireWarning $ pwdGraceAuthnLimit $
93 pwdLockout $ pwdLockoutDuration $
94 pwdMaxFailure $ pwdFailureCountInterval $
95 pwdMustChange $ pwdAllowUserChange $
99 This implementation also provides an additional
101 objectclass, used for password quality checking (see below).
104 ( 1.3.6.1.4.1.4754.2.99.1
105 NAME 'pwdPolicyChecker'
108 MAY ( pwdCheckModule ) )
111 Every account that should be subject to password policy control should
115 attribute containing the DN of a valid
117 entry, or they can simply use the configured default.
118 In this way different users may be managed according to
121 .SH OBJECT CLASS ATTRIBUTES
123 Each one of the sections below details the meaning and use of a particular
131 This attribute contains the name of the attribute to which the password
132 policy is applied. For example, the password policy may be applied
137 Note: in this implementation, the only
141 .IR " userPassword ".
144 ( 1.3.6.1.4.1.42.2.27.8.1.1
146 EQUALITY objectIdentifierMatch
147 SYNTAX 1.3.6.1.4.1.1466.115.121.1.38 )
152 This attribute contains the number of seconds that must elapse
153 between modifications allowed to the password. If this attribute
154 is not present, zero seconds is assumed (i.e. the password may be
155 modified whenever and however often is desired).
158 ( 1.3.6.1.4.1.42.2.27.8.1.2
160 EQUALITY integerMatch
161 SYNTAX 1.3.6.1.4.1.1466.115.121.1.27
167 This attribute contains the number of seconds after which a modified
168 password will expire. If this attribute is not present, or if its
169 value is zero (0), then passwords will not expire.
172 ( 1.3.6.1.4.1.42.2.27.8.1.3
174 EQUALITY integerMatch
175 SYNTAX 1.3.6.1.4.1.1466.115.121.1.27
181 This attribute is used to specify the maximum number of used
182 passwords that will be stored in the
186 attribute is not present, or if its value is
187 zero (0), used passwords will not be stored in
189 and thus any previously-used password may be reused.
190 No history checking occurs if the password is being modified by the
192 although the password is saved in the history.
195 ( 1.3.6.1.4.1.42.2.27.8.1.4
197 EQUALITY integerMatch
198 SYNTAX 1.3.6.1.4.1.1466.115.121.1.27
204 This attribute indicates if and how password syntax will be checked
205 while a password is being modified or added. If this attribute is
206 not present, or its value is zero (0), no syntax checking will be
207 done. If its value is one (1), the server will check the syntax,
208 and if the server is unable to check the syntax,
209 whether due to a client-side hashed password or some other reason,
211 accepted. If its value is two (2), the server will check the syntax,
212 and if the server is unable to check the syntax it will return an
213 error refusing the password.
216 ( 1.3.6.1.4.1.42.2.27.8.1.5
217 NAME 'pwdCheckQuality'
218 EQUALITY integerMatch
219 SYNTAX 1.3.6.1.4.1.1466.115.121.1.27
225 When syntax checking is enabled
228 attribute), this attribute contains the minimum
229 number of characters that will be accepted in a password. If this
230 attribute is not present, minimum password length is not
231 enforced. If the server is unable to check the length of the password,
232 whether due to a client-side hashed password or some other reason,
233 the server will, depending on the
235 .BR pwdCheckQuality ,
236 either accept the password
237 without checking it (if
239 is zero (0) or one (1)) or refuse it (if
244 ( 1.3.6.1.4.1.42.2.27.8.1.6
246 EQUALITY integerMatch
247 SYNTAX 1.3.6.1.4.1.1466.115.121.1.27
253 This attribute contains the maximum number of seconds before a
254 password is due to expire that expiration warning messages will be
255 returned to a user who is authenticating to the directory.
256 If this attribute is not
257 present, or if the value is zero (0), no warnings will be sent.
260 ( 1.3.6.1.4.1.42.2.27.8.1.7
261 NAME 'pwdExpireWarning'
262 EQUALITY integerMatch
263 SYNTAX 1.3.6.1.4.1.1466.115.121.1.27
267 .B pwdGraceAuthnLimit
269 This attribute contains the number of times that an expired password
270 may be used to authenticate a user to the directory. If this
271 attribute is not present or if its value is zero (0), users with
272 expired passwords will not be allowed to authenticate to the
276 ( 1.3.6.1.4.1.42.2.27.8.1.8
277 NAME 'pwdGraceAuthnLimit'
278 EQUALITY integerMatch
279 SYNTAX 1.3.6.1.4.1.1466.115.121.1.27
285 This attribute specifies the action that should be taken
286 by the directory when a user has made a number of failed attempts
287 to authenticate to the directory. If
289 is set (its value is "TRUE"), the user will not be allowed to
290 attempt to authenticate to the directory after there have been a
291 specified number of consecutive failed bind attempts. The maximum
292 number of consecutive failed bind attempts allowed is specified by
297 is not present, or if its value is "FALSE", the password may be
298 used to authenticate no matter how many consecutive failed bind
299 attempts have been made.
302 ( 1.3.6.1.4.1.42.2.27.8.1.9
304 EQUALITY booleanMatch
305 SYNTAX 1.3.6.1.4.1.1466.115.121.1.7
309 .B pwdLockoutDuration
311 This attribute contains the number of seconds during
312 which the password cannot be used to authenticate the
313 user to the directory due to too many consecutive failed
320 .B pwdLockoutDuration
321 is not present, or if its value is zero (0), the password
322 cannot be used to authenticate the user to the directory
323 again until it is reset by an administrator.
326 ( 1.3.6.1.4.1.42.2.27.8.1.10
327 NAME 'pwdLockoutDuration'
328 EQUALITY integerMatch
329 SYNTAX 1.3.6.1.4.1.1466.115.121.1.27
335 This attribute contains the number of consecutive failed bind
336 attempts after which the password may not be used to authenticate
337 a user to the directory.
340 is not present, or its value is zero (0), then a user will
341 be allowed to continue to attempt to authenticate to
342 the directory, no matter how many consecutive failed
343 bind attempts have occurred with that user's DN.
347 .BR pwdLockoutDuration .)
350 ( 1.3.6.1.4.1.42.2.27.8.1.11
352 EQUALITY integerMatch
353 SYNTAX 1.3.6.1.4.1.1466.115.121.1.27
357 .B pwdFailureCountInterval
359 This attribute contains the number of seconds after which old
360 consecutive failed bind attempts are purged from the failure counter,
361 even though no successful authentication has occurred.
363 .B pwdFailureCountInterval
364 is not present, or its value is zero (0), the failure
365 counter will only be reset by a successful authentication.
368 ( 1.3.6.1.4.1.42.2.27.8.1.12
369 NAME 'pwdFailureCountInterval'
370 EQUALITY integerMatch
371 SYNTAX 1.3.6.1.4.1.1466.115.121.1.27
377 This attribute specifies whether users must change their passwords
378 when they first bind to the directory after a password is set or
379 reset by the administrator, or not. If
381 has a value of "TRUE", users must change their passwords when they
382 first bind to the directory after a password is set or reset by
383 the administrator. If
385 is not present, or its value is "FALSE",
386 users are not required to change their password upon binding after
387 the administrator sets or resets the password.
390 ( 1.3.6.1.4.1.42.2.27.8.1.13
392 EQUALITY booleanMatch
393 SYNTAX 1.3.6.1.4.1.1466.115.121.1.7
397 .B pwdAllowUserChange
399 This attribute specifies whether users are allowed to change their own
401 .B pwdAllowUserChange
402 is set to "TRUE", or if the attribute is not present, users will be
403 allowed to change their own passwords. If its value is "FALSE",
404 users will not be allowed to change their own passwords.
407 ( 1.3.6.1.4.1.42.2.27.8.1.14
408 NAME 'pwdAllowUserChange'
409 EQUALITY booleanMatch
410 SYNTAX 1.3.6.1.4.1.1466.115.121.1.7
416 This attribute denotes whether the user's existing password must be sent
417 along with their new password when changing a password. If
419 is set to "TRUE", the existing password must be sent
420 along with the new password. If the attribute is not present, or
421 its value is "FALSE", the existing password need not be sent
422 along with the new password.
425 ( 1.3.6.1.4.1.42.2.27.8.1.15
427 EQUALITY booleanMatch
428 SYNTAX 1.3.6.1.4.1.1466.115.121.1.7
434 This attribute names a user-defined loadable module that must
435 instantiate the check_password() function. This function
436 will be called to further check a new password if
438 is set to one (1) or two (2),
439 after all of the built-in password compliance checks have
440 been passed. This function will be called according to this
445 (char *pPasswd, char **ppErrStr, Entry *pEntry);
449 parameter contains the clear-text user password, the
451 parameter contains a double pointer that allows the function
452 to return human-readable details about any error it encounters.
455 parameter, if non-NULL, carries a pointer to the
456 entry whose password is being checked.
461 must NOT attempt to use it/them.
462 A return value of LDAP_SUCCESS from the called
463 function indicates that the password is ok, any other value
464 indicates that the password is unacceptable. If the password is
465 unacceptable, the server will return an error to the client, and
467 may be used to return a human-readable textual explanation of the
468 error. The error string must be dynamically allocated as it will
469 be free()'d by slapd.
472 ( 1.3.6.1.4.1.4754.1.99.1
473 NAME 'pwdCheckModule'
474 EQUALITY caseExactIA5Match
475 SYNTAX 1.3.6.1.4.1.1466.115.121.1.26
480 The user-defined loadable module named by
484 standard executable search PATH.
488 is a non-standard extension to the LDAP password
491 .SH OPERATIONAL ATTRIBUTES
493 The operational attributes used by the
495 module are stored in the user's entry. Most of these attributes
496 are not intended to be changed directly by users; they are there
497 to track user activity. They have been detailed here so that
498 administrators and users can both understand the workings of
504 Note that the current IETF Password Policy proposal does not define
505 how these operational attributes are expected to behave in a
506 replication environment. In general, authentication attempts on
507 a slave server only affect the copy of the operational attributes
508 on that slave and will not affect any attributes for
509 a user's entry on the master server. Operational attribute changes
510 resulting from authentication attempts on a master server
511 will usually replicate to the slaves (and also overwrite
512 any changes that originated on the slave).
513 These behaviors are not guaranteed and are subject to change
514 when a formal specification emerges.
520 attribute is not strictly part of the
522 module. It is, however, the attribute that is tracked and controlled
523 by the module. Please refer to the standard OpenLDAP schema for
528 This attribute refers directly to the
530 subentry that is to be used for this particular directory user.
533 exists, it must contain the DN of a valid
535 object. If it does not exist, the
537 module will enforce the default password policy rules on the
538 user associated with this authenticating DN. If there is no
539 default, or the referenced subentry does not exist, then no
540 policy rules will be enforced.
543 ( 1.3.6.1.4.1.42.2.27.8.1.23
544 NAME 'pwdPolicySubentry'
545 DESC 'The pwdPolicy subentry in effect for
547 EQUALITY distinguishedNameMatch
548 SYNTAX 1.3.6.1.4.1.1466.115.121.1.12
551 USAGE directoryOperation)
556 This attribute denotes the last time that the entry's password was
557 changed. This value is used by the password expiration policy to
558 determine whether the password is too old to be allowed to be used
559 for user authentication. If
561 does not exist, the user's password will not expire.
564 ( 1.3.6.1.4.1.42.2.27.8.1.16
565 NAME 'pwdChangedTime'
566 DESC 'The time the password was last changed'
567 SYNTAX 1.3.6.1.4.1.1466.115.121.1.24
568 EQUALITY generalizedTimeMatch
569 ORDERING generalizedTimeOrderingMatch
572 USAGE directoryOperation)
575 .B pwdAccountLockedTime
577 This attribute contains the time that the user's account was locked.
578 If the account has been locked, the password may no longer be used to
579 authenticate the user to the directory. If
580 .B pwdAccountLockedTime
581 is set to 000001010000Z, the user's account has been permanently locked
582 and may only be unlocked by an administrator.
585 ( 1.3.6.1.4.1.42.2.27.8.1.17
586 NAME 'pwdAccountLockedTime'
587 DESC 'The time an user account was locked'
588 SYNTAX 1.3.6.1.4.1.1466.115.121.1.24
589 EQUALITY generalizedTimeMatch
590 ORDERING generalizedTimeOrderingMatch
593 USAGE directoryOperation)
598 This attribute contains the timestamps of each of the consecutive
599 authentication failures made upon attempted authentication to this
600 DN (i.e. account). If too many timestamps accumulate here (refer to
603 password policy attribute for details),
606 password policy attribute is set to "TRUE", the
607 account may be locked.
608 (Please also refer to the
610 password policy attribute.)
611 Excess timestamps beyond those allowed by
613 may also be purged. If a successful authentication is made to this
614 DN (i.e. to this user account), then
616 will be cleansed of entries.
619 ( 1.3.6.1.4.1.42.2.27.8.1.19
620 NAME 'pwdFailureTime'
621 DESC 'The timestamps of the last consecutive
622 authentication failures'
623 SYNTAX 1.3.6.1.4.1.1466.115.121.1.24
624 EQUALITY generalizedTimeMatch
625 ORDERING generalizedTimeOrderingMatch
627 USAGE directoryOperation )
632 This attribute contains the history of previously used passwords
633 for this DN (i.e. for this user account).
634 The values of this attribute are stored in string format as follows:
640 time "#" syntaxOID "#" length "#" data
645 GeneralizedTime as specified in section 3.3.13 of [RFC4517]
649 syntaxOID = numericoid
651 This is the string representation of the dotted-decimal OID that
652 defines the syntax used to store the password. numericoid is
653 described in section 1.4 of [RFC4512].
656 length = NumericString
658 The number of octets in the data. NumericString is described in
659 section 3.3.23 of [RFC4517].
664 Octets representing the password in the format specified by syntaxOID.
669 This format allows the server to store and transmit a history of
670 passwords that have been used. In order for equality matching
671 on the values in this attribute to function properly, the time
672 field is in GMT format.
675 ( 1.3.6.1.4.1.42.2.27.8.1.20
677 DESC 'The history of user passwords'
678 SYNTAX 1.3.6.1.4.1.1466.115.121.1.40
679 EQUALITY octetStringMatch
681 USAGE directoryOperation)
685 This attribute contains the list of timestamps of logins made after
686 the user password in the DN has expired. These post-expiration
687 logins are known as "\fIgrace logins\fP".
690 have been used (please refer to the
691 .B pwdGraceLoginLimit
692 password policy attribute), then the DN will no longer be allowed
693 to be used to authenticate the user to the directory until the
694 administrator changes the DN's
699 ( 1.3.6.1.4.1.42.2.27.8.1.21
700 NAME 'pwdGraceUseTime'
701 DESC 'The timestamps of the grace login once the password has expired'
702 SYNTAX 1.3.6.1.4.1.1466.115.121.1.24
703 EQUALITY generalizedTimeMatch
705 USAGE directoryOperation)
710 This attribute indicates whether the user's password has been reset
711 by the administrator and thus must be changed upon first use of this
712 DN for authentication to the directory. If
714 is set to "TRUE", then the password was reset and the user must change
715 it upon first authentication. If the attribute does not exist, or
716 is set to "FALSE", the user need not change their password due to
717 administrative reset.
720 ( 1.3.6.1.4.1.42.2.27.8.1.22
722 DESC 'The indication that the password has
724 EQUALITY booleanMatch
725 SYNTAX 1.3.6.1.4.1.1466.115.121.1.7
727 USAGE directoryOperation)
735 suffix dc=example,dc=com
738 ppolicy_default "cn=Standard,ou=Policies,dc=example,dc=com"
746 "OpenLDAP Administrator's Guide" (http://www.OpenLDAP.org/doc/admin/)
748 IETF LDAP password policy proposal by P. Behera, L. Poitou and J.
749 Sermersheim: documented in IETF document
750 "draft-behera-ldap-password-policy-09.txt".
753 The LDAP Password Policy specification is not yet an approved standard,
754 and it is still evolving. This code will continue to be in flux until the
755 specification is finalized.
759 This module was written in 2004 by Howard Chu of Symas Corporation
760 with significant input from Neil Dunbar and Kartik Subbarao of Hewlett-Packard.
762 This manual page borrows heavily and shamelessly from the specification
763 upon which the password policy module it describes is based. This
765 IETF LDAP password policy proposal by P. Behera, L.
766 Poitou and J. Sermersheim.
767 The proposal is fully documented in
769 IETF document named draft-behera-ldap-password-policy-09.txt,
770 written in July of 2005.
772 .\" Shared Project Acknowledgement Text
773 .B "OpenLDAP Software"
774 is developed and maintained by The OpenLDAP Project <http://www.openldap.org/>.
775 .B "OpenLDAP Software"
776 is derived from University of Michigan LDAP 3.3 Release.