首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >迁移到新的dovecot服务器;Dovecot无法使用旧密码数据库进行身份验证。

迁移到新的dovecot服务器;Dovecot无法使用旧密码数据库进行身份验证。
EN

Server Fault用户
提问于 2013-11-04 23:14:47
回答 2查看 1.4K关注 0票数 0

我正在将我的公司内部网从OS服务器迁移到Ubuntu12.04服务器。我们使用一个平面文件来存储用户名和密码哈希。Apache和Dovecot使用此文件对用户进行身份验证。Ubuntu服务器运行Dovecot2.0,而OS服务器运行Dovecot1.2。

我已经迁移了WebDav,它使用Apache进行身份验证。身份验证有效。我正在迁移我们的韵律服务器,它使用Dovecot进行身份验证。Dovecot已经启动并正在运行,但是当我使用telnet a login username password或doveadm sudo doveadm auth username测试身份验证时,我得到了dovecot: auth: passwd-file(username): unknown user

dovecot: auth: Debug: client out: FAIL#0111#011user=username在我的日志文件中。

我可以使用sudo dovecot user username来执行用户查找,它将返回用户的信息。我可以在本地生成一个密码哈希,Dovecot将对测试密码进行身份验证。

编辑:该方案是设置在地下室,这是默认的方式。

编辑第二个:下面是我在auth-passwdfile.conf. Edit中的内容:

代码语言:javascript
复制
# Authentication for passwd-file users. Included from auth.conf.
#
# passwd-like file with specified location.
# <doc/wiki/AuthDatabase.PasswdFile.txt>

passdb {
  driver = passwd-file
  args = scheme=CRYPT username_format=%u /srv/auth/passwd/passwd.intranet
}

userdb {
  driver = passwd-file
  args = username_format=%u /srv/auth/passwd/passwd.intranet
}

密码文件的外观:

代码语言:javascript
复制
username:userpasswordhash:
EN

回答 2

Server Fault用户

回答已采纳

发布于 2013-11-09 00:59:29

我的问题是密码文件格式。这是username:passwordhash:username@domain.com,它应该是username:passwordhash::::::username@domain.com。额外的冒号划定了Dovecot期望在那里的空字段。我想新版本的Dovecot比旧的更挑剔。

票数 0
EN

Server Fault用户

发布于 2013-11-05 00:47:48

Dovecot支持多种密码加密方案。有些需要交换纯文本密码。Dovecot2.0在密码前加上诸如{SSHA256}这样的方案。可以在指定文件时指定默认方案。

我发现升级时需要指定auth_username_format。下面这样的配置可能会有所帮助。

代码语言:javascript
复制
auth_username_format=%n
mechanisms = plain login
# passwd-like file with specified location
passdb passwd-file {
    args = scheme=plain-md5 /etc/dovecot/passwd.md5
}
票数 1
EN
页面原文内容由Server Fault提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://serverfault.com/questions/550697

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档