- 论坛徽章:
- 0
|
新建一个邮件系统,为了跟现有认证系统(radius+openldap)对接作为邮件系统的认证系统,因为现有的ldap系统格式是固定的,所以只能采用radius的认证,使用postfix+cyrus-sasl+dovecot+pam_radius,现在的问题如下:
1、系统所有组件都安装成功,postfix+sasl+pam_radius工作也正常,可以正常发信,通过radius系统认证
2、dovecot+pam_radius认证存在问题,具体如下:
[root@zhengmk log]# more /etc/pam.d/dovecot
#%PAM-1.0
auth sufficient /lib/security/pam_radius_auth.so
account sufficient /lib/security/pam_radius_auth.so
password sufficient /lib/security/pam_radius_auth.so
[root@zhengmk ~]# telnet localhost 110
Trying 127.0.0.1...
Connected to localhost.localdomain (127.0.0.1).
Escape character is '^]'.
+OK Dovecot ready.
user systemman2
+OK
pass 123456
-ERR [IN-USE] Internal login failure. Refer to server log for more information.
[root@zhengmk log]# tail maillog
Jul 11 00:52:15 zhengmk dovecot: Dovecot v1.0.7 starting up
Jul 11 00:52:32 zhengmk dovecot: auth(default): userdb(systemman,::ffff:127.0.0.1): user not found from userdb
Jul 11 00:52:32 zhengmk dovecot: pop3-login: Internal login failure: user=<systemman>, method=PLAIN, rip=::ffff:127.0.0.1, lip=::ffff:127.0.0.1, secured
Jul 11 00:53:57 zhengmk dovecot: auth(default): userdb(systemman2,::ffff:127.0.0.1): user not found from userdb
Jul 11 00:53:57 zhengmk dovecot: pop3-login: Internal login failure: user=<systemman2>, method=PLAIN, rip=::ffff:127.0.0.1, lip=::ffff:127.0.0.1, secured
[root@zhengmk audit]# tail audit.log
type=AVC msg=audit(1215708837.905:680456): avc: denied { name_bind } for pid=26749 comm="dovecot-auth" src=32767 scontext=user_u:system_r:dovecot_auth_t:s0 tcontext=system_u bject_r:port_t:s0 tclass=udp_socket
type=SYSCALL msg=audit(1215708837.905:680456): arch=40000003 syscall=102 success=no exit=-13 a0=2 a1=bf881a90 a2=3f8800 a3=96d39e0 items=0 ppid=26673 pid=26749 auid=1000 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=7 comm="dovecot-auth" exe="/usr/libexec/dovecot/dovecot-auth" subj=user_u:system_r:dovecot_auth_t:s0 key=(null)
type=USER_AUTH msg=audit(1215708837.927:680457): user pid=26749 uid=0 auid=1000 subj=user_u:system_r:dovecot_auth_t:s0 msg='PAM: authentication acct="systemman2" : exe="/usr/libexec/dovecot/dovecot-auth" (hostname=::ffff:127.0.0.1, addr=::ffff:127.0.0.1, terminal=dovecot res=success)'
type=USER_ACCT msg=audit(1215708837.928:68045 : user pid=26749 uid=0 auid=1000 subj=user_u:system_r:dovecot_auth_t:s0 msg='PAM: accounting acct="systemman2" : exe="/usr/libexec/dovecot/dovecot-auth" (hostname=::ffff:127.0.0.1, addr=::ffff:127.0.0.1, terminal=dovecot res=success)'
从audit.log跟服务器radius.log文件可看出认证已经通过,但通过maillog可以看出在本地userdb找不到此用户。我的理解是这样的:radius只是提供认证,并不存储用户等信息,而dovecot需要有一个用户库来存相关的信息,从而导致认证可通过但无法收信,不知对否。具体如何解决,忘各位兄弟指点一二,TKS。 |
|