ad_sender_login_maps.cf
ad_virtual_group_maps.cf
ad_virtual_mailbox_maps.cf
这三个文件直接配置dc=test,dc=com就可以查询整个域里面的用户,但是dovecot-ldap.conf中这样配置就不能认证通过,能不能帮我看看啊,
ad_sender_login_maps.cf如下:
server_host = dc.test.com
server_port = 389
version = 3
bind = yes
start_tls = no
bind_dn = vmail
bind_pw = Aa123456
search_base = dc=test,dc=cn
scope = sub
#query_filter = (&(userPrincipalName=%s)(objectClass=person)(!(userAccountControl:1.2.840.113556.1.4.803:=2)))
query_filter = (&(objectclass=person)(mail=%s))
#result_attribute= userPrincipalName
result_attribute= mail
debuglevel = 0
ad_virtual_group_maps.cf如下:
server_host = dc.test.com
server_port = 389
version = 3
bind = yes
start_tls = no
bind_dn = vmail
bind_pw = Aa123456
search_base = dc=test,dc=com
scope = sub
query_filter = (&(objectClass=group)(mail=%s))
special_result_attribute = member
leaf_result_attribute = mail
result_attribute= userPrincipalName
debuglevel = 0
ad_virtual_mailbox_maps.cf如下:
server_host = dc.test.com
server_port = 389
version = 3
bind = yes
start_tls = no
bind_dn = vmail
bind_pw = Aa123456
search_base = dc=test,dc=com
scope = sub
query_filter = (&(objectclass=person)(mail=%s))
result_attribute= mail
result_format = %d/%u/Maildir/
debuglevel = 0
dovecot-ldap.conf如下:
hosts = dc.test.com:389
ldap_version = 3
auth_bind = yes
dn = vmail
dnpass = Aa123456
base = cn=users,dc=test,dc=com
scope = subtree
deref = never
user_filter = (&(userPrincipalName=%u)(objectClass=person)(!(userAccountControl:1.2.840.113556.1.4.803:=2)))
pass_filter = (&(userPrincipalName=%u)(objectClass=person)(!(userAccountControl:1.2.840.113556.1.4.803:=2)))
pass_attrs = userPassword=password
default_pass_scheme = CRYPT
user_attrs = =home=/var/vmail/vmail1/%Ld/%Ln/Maildir/,=mail=maildir:/var/vmail/vmail1/%Ld/%Ln/Maildir/
这样配只能让users中的用户登陆,但是如果改成OU=test,test是AD中新建的一个OU,OU中的用户都无法认证,另外我尝试过将OU中的用户移动到users中,同样无法认证日志是unknow user,在users中单独新建的就能认证,能不能帮我分析下