在 DN 输入中使用 uid 而不是 cn 登录 ldap [英] Login to ldap with uid instead of cn in DN input

查看:29
本文介绍了在 DN 输入中使用 uid 而不是 cn 登录 ldap的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在使用 LDAP 验证登录时遇到了问题.

I'm running into a problem using LDAP to authenticate logins.

我已经创建了一个包含所有基本信息的用户,并尝试使用详细信息通过 phpldapadmin 登录:

I already created a user with all basic info and try to login through phpldapadmin with detail :

Login DN: cn=Sample User,ou=people,dc=example,dc=om
Password: xxxx

然后就可以登录了.

但是当我尝试使用这个时:

But when i try to use with this :

Login DN: uid=sampleuser,ou=people,dc=example,dc=om
Password: xxxx

它永远无法正常工作(无法登录).

it never works (cannot login).

请告诉我应该配置什么?

Please tell me what should i config?

推荐答案

如果 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.

这篇关于在 DN 输入中使用 uid 而不是 cn 登录 ldap的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆