Chinaunix
标题:
【求助】smtp通过ldap认证出错
[打印本页]
作者:
hanson2046
时间:
2007-07-16 16:52
标题:
【求助】smtp通过ldap认证出错
安装软件:postfix,openldap,sasl2,courier-imap
认证方式:sasl2通过authdaemond取得ldap上的mail来认证
ldap上面使用qmail.schema 增加用户的mail,mailMessageStore等属性
当我用telnet localhost 25 来测试认证,出现错误。
[root@62 /usr/local/etc/postfix]# telnet localhost 25
Trying ::1...
telnet: connect to address ::1: Connection refused
Trying 127.0.0.1...
Connected to localhost.hanson.com.
Escape character is '^]'.
220 postfix.hanson.com ESMTP Postfix
auth login
334 VXNlcm5hbWU6
c21iaEBoYW5zb24uY29t
334 UGFzc3dvcmQ6
c21iaA==
535 5.7.0 Error:
authentication failed: generic failure
日志显示:
Jul 16 14:10:48 62 authdaemond: authldaplib: refuse to authenticate
smbh@hanson.com
:
uid=0, gid=0 (zero uid or gid not permitted)
Jul 16 14:10:48 62 postfix/smtpd[1935]: warning: SASL authentication failure: could not verify password
Jul 16 14:10:48 62 postfix/smtpd[1935]: warning: localhost.hanson.com[127.0.0.1]: SASL login authentication failed: generic failure
Jul 16 14:14:08 62 postfix/smtpd[1935]: disconnect from localhost.hanson.com[127.0.0.1]
应该是没有取得用户得uid和gid。但是我在authldaprc文件种已经设置了LDAP_GLOB_UID vmail,LDAP_GLOB_GID vmail。就是说用vmail这个系统用户得uid和gid啊。
我的authldaprc配置
LDAP_URI ldap://192.168.21.56
LDAP_BASEDN dc=hanson,dc=com
LDAP_BINDDN cn=Manager, dc=hanson, dc=com
LDAP_BINDPW pwd
LDAP_TIMEOUT 5
LDAP_AUTHBIND 1
LDAP_MAIL mail
LDAP_FILTER (accountStatus=active)
LDAP_DOMAIN hanson.com
LDAP_GLOB_UID vmail
LDAP_GLOB_GID vmail
LDAP_HOMEDIR homeDirectory
#LDAP_MAILROOT /var/mail
#LDAP_MAILDIR mailbox
#LDAP_DEFAULTDELIVERY defaultDelivery
#LDAP_MAILDIRQUOTA quota
LDAP_FULLNAME cn
#LDAP_CLEARPW userPassword
LDAP_CRYPTPW userPassword
#LDAP_UID uidNumber
#LDAP_GID gidNumber
LDAP_DEREF never
LDAP_TLS 0
google上面搜不到相关的解决办法。
[
本帖最后由 hanson2046 于 2007-7-16 16:56 编辑
]
作者:
tom_xx_hu@yahoo
时间:
2007-07-16 23:44
试试在slapd.conf 中加allow bind_v2
作者:
hanson2046
时间:
2007-07-17 11:26
今天不知道改了什么地址突然就好了
好像不是slapd.conf的原因
我再找找原因:)
作者:
Intranet
时间:
2007-07-23 11:21
是什么原因?
我也碰到了..
作者:
xgb123
时间:
2007-12-27 17:47
hanson2046 找到是什么原因了吗?
我也碰到同样的问题,请求帮忙!
欢迎光临 Chinaunix (http://bbs.chinaunix.net/)
Powered by Discuz! X3.2