Password policy queries
You can issue the commands provided here to resolve password policy queries.
The password policy operational attributes can be used to view the status of a directory entry or to query for entries matching specified criteria.Operational attributes are returned on a search request only when specifically requested by the client. To use these attributes in search operations, you must have permission to critical attributes, or permission to the specific attributes used.
ldapsearch -s base -D <adminDN> -w <adminPW> -b "uid=user1,cn=users,o=sample"
"objectclass=*" +ibmpwdpolicypwdChangedTime attribute is updated only when one of the following
conditions is met:pwdMaxAgeandpwdMinAgehas non-zero values.- You do not have prior explicit value for
pwdChangedTime(which is not the same asibm-pwdPolicyStartTime) .
The pwdChangedTime attribute value can be used to determine password expiration time. The expiration time is calculated based on the password policy start time and the creation timestamp of user entry. If one of the dependent values do not exist, the pwdChangedTime attribute might not exist. Therefore, the pwdChangedTime attribute in a search filter might not return all the user entries for which the passwords are about to expire. To determine if a user password is about to expire, run the following command:
idsldapsearch -p port -D adminDN -w adminPWD -b base -s sub \
'(&(!(pwdChangedTime=*))(userPassword=*))' pwdChangedTime
To find all user entries for which passwords are about to expire, run the following command:
idsldapsearch -p port -D adminDN -w adminPWD -b base
-s sub '(userPassword=*)' pwdChangedTime
idsldapsearch –b "cn=users,o=sample" –s sub "(pwdAccountLockedTime=*)" dn idsldapsearch –b "cn=users,o=sample" –s sub "(pwdReset=TRUE)" dn