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

查看:678
本文介绍了在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). 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天全站免登陆