我无法使用NIS用户帐户login到邮件服务器

以下是我的configuration

# 2.0.13: /etc/dovecot/dovecot.conf # OS: Linux 3.0.0-17-server x86_64 Ubuntu 11.10 auth_mechanisms = plain login mail_location = maildir:/nfs/users/%u/Maildir passdb { args = scheme=CRYPT username_format=%u /etc/dovecot/users driver = passwd-file } protocols = " imap pop3" service auth { unix_listener /var/spool/postfix/private/auth { group = postfix mode = 0660 user = postfix } } service imap-login { inet_listener imap { port = 143 } inet_listener imaps { port = 993 ssl = yes } } ssl_cert = </etc/ssl/certs/mail.prisaltd.local.crt ssl_key = </etc/ssl/private/prisa.key userdb { args = username_format=%u /etc/dovecot/users driver = passwd-file } protocol imap { imap_client_workarounds = tb-extra-mailbox-sep imap_logout_format = bytes=%i/%o mail_plugins = } 

/etc/pam.d/common-password

 # here are the per-package modules (the "Primary" block) password [success=1 default=ignore] pam_unix.so obscure sha512 nis # here's the fallback if no module succeeds password requisite pam_deny.so # prime the stack with a positive return value if there isn't one already; # this avoids us returning an error just because nothing sets a success code # since the modules above will each just jump around password required pam_permit.so # and here are more per-package modules (the "Additional" block) password optional pam_ecryptfs.so # end of pam-auth-update config 

鸽子日志

 May 26 13:14:39 prisa-appserver ntpdate[574]: Can't find host ntp.ubuntu.com: Name or service not known (-2) May 26 13:14:39 prisa-appserver ntpdate[574]: no servers can be used, exiting May 26 13:14:48 prisa-appserver sudo: pam_ecryptfs: pam_sm_authenticate: /home/prisa is already mounted May 26 13:14:50 prisa-appserver kernel: [ 90.418686] CIFS: Unknown mount option - May 26 13:14:50 prisa-appserver kernel: [ 90.472004] CIFS VFS: default security mechanism requested. The default security mechanism will be upgraded from ntlm to ntlmv2 in kernel release 3.1 May 26 13:15:44 prisa-appserver ntpdate[1571]: Can't find host ntp.ubuntu.com: Name or service not known (-2) May 26 13:15:44 prisa-appserver ntpdate[1571]: no servers can be used, exiting May 26 13:17:01 prisa-appserver CRON[1678]: (root) CMD ( cd / && run-parts --report /etc/cron.hourly) May 26 13:39:01 prisa-appserver CRON[1775]: (root) CMD ( [ -x /usr/lib/php5/maxlifetime ] && [ -d /var/lib/php5 ] && find /var/lib/php5/ -depth -mindepth 1 -maxdepth 1 -type f -cmin +$(/usr/lib/php5/maxlifetime) ! -execdir fuser -s {} 2>/dev/null \; -delete) May 26 13:46:08 prisa-appserver dovecot: imap-login: Disconnected (auth failed, 3 attempts): user=<prisa>, method=PLAIN, rip=192.168.128.14, lip=192.168.128.15, TLS May 26 13:46:59 prisa-appserver dovecot: imap-login: Aborted login (no auth attempts): rip=192.168.128.14, lip=192.168.128.15 May 26 13:46:59 prisa-appserver dovecot: imap-login: Aborted login (no auth attempts): rip=192.168.128.14, lip=192.168.128.15 May 26 13:46:59 prisa-appserver dovecot: imap-login: Disconnected (no auth attempts): rip=192.168.128.14, lip=192.168.128.15, TLS handshaking: SSL_accept() failed: error:14094418:SSL routines:SSL3_READ_BYTES:tlsv1 alert unknown ca: SSL alert number 48 May 26 13:46:59 prisa-appserver dovecot: pop3-login: Aborted login (no auth attempts): rip=192.168.128.14, lip=192.168.128.15 May 26 13:46:59 prisa-appserver dovecot: pop3-login: Aborted login (no auth attempts): rip=192.168.128.14, lip=192.168.128.15 May 26 13:46:59 prisa-appserver dovecot: pop3-login: Disconnected (no auth attempts): rip=192.168.128.14, lip=192.168.128.15, TLS handshaking: SSL_accept() failed: error:14094418:SSL routines:SSL3_READ_BYTES:tlsv1 alert unknown ca: SSL alert number 48 May 26 13:46:59 prisa-appserver dovecot: imap-login: Aborted login (no auth attempts): rip=192.168.128.14, lip=192.168.128.15, TLS May 26 13:46:59 prisa-appserver dovecot: pop3-login: Disconnected (no auth attempts): rip=192.168.128.14, lip=192.168.128.15, TLS May 26 13:47:04 prisa-appserver postfix/smtpd[1820]: connect from unknown[192.168.128.14] May 26 13:47:04 prisa-appserver postfix/smtpd[1820]: improper command pipelining after EHLO from unknown[192.168.128.14] May 26 13:47:04 prisa-appserver postfix/smtpd[1820]: disconnect from unknown[192.168.128.14] May 26 13:47:04 prisa-appserver postfix/smtpd[1830]: connect from unknown[192.168.128.14] May 26 13:47:04 prisa-appserver postfix/smtpd[1830]: lost connection after CONNECT from unknown[192.168.128.14] May 26 13:47:04 prisa-appserver postfix/smtpd[1830]: disconnect from unknown[192.168.128.14] May 26 13:47:22 prisa-appserver dovecot: imap-login: Disconnected (auth failed, 3 attempts): user=<femmy>, method=PLAIN, rip=192.168.128.14, lip=192.168.128.15, TLS May 26 13:47:48 prisa-appserver dovecot: imap-login: Disconnected (auth failed, 3 attempts): user=<femmy@mail.prisaltd.local>, method=PLAIN, rip=192.168.128.14, lip=192.168.128.15, TLS May 26 13:48:15 prisa-appserver dovecot: imap-login: Disconnected (auth failed, 3 attempts): user=<femmy>, method=PLAIN, rip=192.168.128.14, lip=192.168.128.15, TLS May 26 13:48:21 prisa-appserver dovecot: imap-login: Disconnected (auth failed, 3 attempts): user=<femmy@mail.prisaltd.local>, method=PLAIN, rip=192.168.128.14, lip=192.168.128.15, TLS 

请问我做错了什么? 我已经在这个2周了。

谢谢

    Dovecot不假设您要为系统用户启用访问权限。 这使它可以提供一个只有虚拟用户才能访问的环境。 看来你只configuration了虚拟用户。 您可以组合多个用户和密码数据库。 我使用额外的密码数据库为用户提供电子邮件只能从网吧和其他远程位置的密码。

    您没有规定与系统(NIS)用户login。 尝试使用passwd驱动程序添加userdb规范。 像这样的东西应该工作。

     userdb { driver = passwd } 

    你还需要一个相应的passdb (密码数据库)规范。 使用passwd作为驱动程序将使用应包含NID数据的NSS查找。 由于您已经configuration了PAM,您可能需要尝试pam驱动程序。

     passdb { driver = passwd } 

    在Ubuntu上,这些选项可用,但在/etc/dovecot/conf.d/auth-system.conf.ext/etc/dovecot/conf.d/auth-system.conf.ext 。 您需要取消注释该文件中的相应行,以及在/etc/dovecot/confd./10-auth.conf取消包含此文件的/etc/dovecot/confd./10-auth.conf 。 这将是一个合适的文件来添加configuration,如果你有。 根据我的经验,只要configuration文件包含在configuration文件中, dovecot就会以任何顺序接受configuration数据。 命令dovecot -n将在包含和注释移除后显示configuration数据。