How to test ldap ppolicy enforcement

喜夏-厌秋 提交于 2019-12-07 06:15:27
  1. The only user that is free from the password policy constraints is the internal rootdn user. You shouldn't use that yourself for anything. It is the user that slapd itself uses to update the DIT. You should define another admin user, in the DIT, with the necessary permissions. Using the rootdn user for admin tasks will bypass every constraint known to man.

  2. To use the ppolicy fully, you have to use the password policy request control and check for the corresponding response control in your code so you can discover impending expiry, grace periods, etc.

You can test password policy with ldap* commands (OpenLDAP LDAP clients), which allow to use LDAP controls.

You must know a valid DN and a password (not rootdn, which override password policy).

For example:

clement@ader-xps:~$ ldapwhoami -x -H ldap://localhost -D uid=coudot,ou=users,dc=example,dc=com -W -e ppolicy 
Enter LDAP Password: 
ldap_bind: Invalid credentials (49); Account locked
标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!