且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

在 DN 输入中使用 uid 而不是 cn 登录 ldap

更新时间:2022-01-21 08:27:06

如果 LDAP 客户端使用简单的 BIND 操作,那么 BIND DN 必须存在.简单的 BIND 操作至少将 DN 和密码作为参数.

If the LDAP client is using a simple BIND operation, then the BIND DN must exist. The simple BIND operation takes as arguments at least the DN and a password.

考虑以下条目:

dn: cn=sample user,ou=people,dc=example,dc=com
objectClass: top
objectClass: inetOrgPerson
cn: sample user
uid: sampleuser

与以下条目不同:

dn: uid=sampleuser,ou=people,dc=example,dc=com
objectClass: top
objectClass: inetOrgPerson
cn: sample user
uid: sampleuser

即使属性相同(本例中省略了inetOrgPerson 所需的SN).Th DN 是 主键,必须与简单的 BIND 操作一起使用.上面给出的条目是两个完全独立的条目,具有两个不同的 DN.

even though the attributes are identical (the SN which is required by inetOrgPerson is omitted in this example). Th DN is the primary key and must be used with the simple BIND operation. The entries given above, are two complete separate entries with two different DNs.