码迷,mamicode.com
首页 > 其他好文 > 详细

CentOS 6通过ldap集成AD域账号(nslcd方式)

时间:2018-04-02 20:14:18      阅读:474      评论:0      收藏:0      [点我收藏+]

标签:nslcd

CentOS 6通过ldap集成AD域账号(nslcd方式):

CentOS 6默认有安装nss-pam-ldapd软件(rpm -qa nss-pam-ldapd,rpm -ql nss-pam-ldapd)

vi /etc/nsswitch.conf

passwd: files ldap
group: files ldap
shadow: files ldap
:wq

vi /etc/nslcd.conf

binddn cn=aa,cn=users,dc=ming,dc=com (aa为普通AD账号,在Users组里)
bindpw ** (aa的密码)

下面部分默认为注释掉的,去掉注释即可

#Mappings for Active Directory
#pagesize 1000
#referrals off
filter passwd (&(objectClass=user)(!(objectClass=computer))(uidNumber=)(unixHomeDirectory=))
map passwd uid sAMAccountName
map passwd homeDirectory unixHomeDirectory
map passwd gecos displayName
filter shadow (&(objectClass=user)(!(objectClass=computer))(uidNumber=)(unixHomeDirectory=))
map shadow uid sAMAccountName
map shadow shadowLastChange pwdLastSet
filter group (objectClass=group)
map group uniqueMember member

uid nslcd
gid ldap

uri ldap://10.0.0.3/

base dc=ming,dc=com
ssl no
tls-cacertdir /etc/openldap/cacerts
:wq

/etc/init.d/nslcd restart

getent passwd | grep zhi.yang

su - zhi.yang

CentOS 6通过ldap集成AD域账号(nslcd方式)

标签:nslcd

原文地址:http://blog.51cto.com/yangzhiming/2093929

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!