LDAP,密码策略不存在

LDAP, pwdpolicy does not exist

我是 LDAP 的新手,我想使用 class pwdpolicy 添加密码策略,但每次我都收到错误:

ERR_04269 OBJECT_CLASS for OID pwdpolicy does not exist!

这是我尝试添加它的方法:

dn: cn=Default Password Policy,ou=pwpolicies,dc=example,dc=com
objectClass: top
objectClass: device
objectClass: pwdPolicy
cn:Default Password Policy
pwdAttribute: userPassword
pwdMaxAge: 7776002
pwdExpireWarning: 432000
pwdInHistory: 3
pwdCheckQuality: 1
pwdMinLength: 8
pwdMaxFailure: 5
pwdLockout: TRUE
pwdLockoutDuration: 900
pwdGraceAuthNLimit: 0
pwdFailureCountInterval: 0
pwdMustChange: TRUE
pwdAllowUserChange: TRUE
pwdSafeModify: FALSE

我更改了 WorkspaceLDAP\openldap\servers\slapd 中的 slapd.conf 也许我配置了错误的 slapd 文件

这是我的slapd.conf

include         %SYSCONFDIR%/schema/core.schema
include         @SCHEMADIR@/core.schema
include         @SCHEMADIR@/cosine.schema
include         @SCHEMADIR@/inetorgperson.schema
include         @SCHEMADIR@/rfc2307bis.schema
include         @SCHEMADIR@/yast.schema


pidfile     %LOCALSTATEDIR%/run/slapd.pid
argsfile    %LOCALSTATEDIR%/run/slapd.args



#######################################################################
# BDB database definitions
#######################################################################

database    mdb
maxsize     1073741824
suffix      "dc=example,dc=com"
checkpoint      1024
cachesize       10000
rootdn      "cn=Administrator,dc=example,dc=com"
rootpw      secret
directory   %LOCALSTATEDIR%/openldap-data
# Indices to maintain
index   objectClass eq
overlay ppolicy
ppolicy_default "cn=Default Password Policy,ou=pwpolicies,dc=example,dc=com"
ppolicy_hash_cleartext
ppolicy_use_lockout

我能以某种方式检查 我的服务器正在使用的 slapd 文件或者配置是否正确吗?

您必须在 slapd.conf 或在线配置中添加和配置 ppolicy 叠加层,无论您使用哪个。