ldap用户剂量不存在于centos 6.5中


-1

希望大家都做得好。

让我说一下,我已经设置了LDAP服务器和客户端机器

服务器工作完美,同时从客户端机器进行搜索它也从LDAP服务器获取查询,但是当我切换用户时它表示用户不存在

[root@ldapc ~]# su - babin
su: user babin does not exist

我从客户端机器尝试了这个,我收到了以下回复

# ldapsearch -x -b dc=tecmintlocal,dc=com -h ldap.tecmintlocal.com

# extended LDIF
#
# LDAPv3
# base <dc=tecmintlocal,dc=com> with scope subtree
# filter: (objectclass=*)
# requesting: ALL
#

# tecmintlocal.com
dn: dc=tecmintlocal,dc=com
dc: tecmintlocal
objectClass: top
objectClass: domain

# People, tecmintlocal.com
dn: ou=People,dc=tecmintlocal,dc=com
ou: People
objectClass: top
objectClass: organizationalUnit

# Group, tecmintlocal.com
dn: ou=Group,dc=tecmintlocal,dc=com
ou: Group
objectClass: top
objectClass: organizationalUnit

# tecmint_gp1, Group, tecmintlocal.com
dn: cn=tecmint_gp1,ou=Group,dc=tecmintlocal,dc=com
objectClass: posixGroup
objectClass: top
cn: tecmint_gp1
userPassword:: YWRtaW4xMjMk
gidNumber: 20000

# babin, People, tecmintlocal.com
dn: uid=babin,ou=People,dc=tecmintlocal,dc=com
uid: babin
cn: babin babin
objectClass: account
objectClass: posixAccount
objectClass: top
objectClass: shadowAccount
userPassword:: YWRtaW4xMjMk
shadowLastChange: 16120
shadowMin: 0
shadowMax: 99999
shadowWarning: 7
loginShell: /bin/bash
uidNumber: 2000
gidNumber: 20000
homeDirectory: /home/babin

# tecmintclient, People, tecmintlocal.com
dn: uid=tecmintclient,ou=People,dc=tecmintlocal,dc=com
uid: tecmintclient
cn: tecmintclient tecmintclient
objectClass: account
objectClass: posixAccount
objectClass: top
objectClass: shadowAccount
userPassword:: YWRtaW4xMjMk
shadowLastChange: 16120
shadowMin: 0
shadowMax: 99999
shadowWarning: 7
loginShell: /bin/bash
uidNumber: 2000
gidNumber: 20000
homeDirectory: /home/tecmintclient

# search result
search: 2
result: 0 Success

# numResponses: 7
# numEntries: 6

Answers:


0

您是否确实将系统配置为从LDAP检索用户帐户?

为此,您通常需要安装一个LDAP客户端,例如nslcd(又名nss-pam-ldapd),它将附带一个NSS模块/etc/nsswitch.conf(告诉系统使用LDAP客户端获取用户信息)。

(您还需要添加一个PAM模块,用于在登录时检查用户密码;它也可以是pam_ldap,或者更安全的东西pam_krb5。)

如果已安装LDAP客户端,请首先确保已配置正确的“基本DN”(搜索位置),并查找各种日志记录/调试选项。

使用Wireshark检查LDAP流量以查看实际执行的搜索:
tshark -n -Y ldap -VO ldap

By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.