我正在尝试使用usermap对一些用户进行对等身份验证。我想要做的是映射用户邮件阅读器,如您所见:
postgres=# \du
List of roles
Role name | Attributes | Member of
------------+------------------------------------------------+-----------
mailreader | | {}
postgres | Superuser, Create role, Create DB, Replication | {}进入系统的用户根,dovecot,后缀。因此,我编辑了我的pg_ident.conf并放置了以下内容:
mailmap dovecot mailreader
mailmap postfix mailreader
mailmap root mailreader我还编辑了pg_hba.conf并附加了以下内容:
local mail all peer map=mailmap当我试图通过sudo psql -U mailreader -d mail命令连接时,我得到:
psql:致命:用户"mailreader“的对等身份验证失败
错误。
我还尝试了以下配置:
local mail all ident map=mailmap没有任何进展。
我能帮忙吗?
有关错误的日志是:
2017-06-27 19:10:10 UTC [1188-1] mailreader@mail LOG: provided user name (mailreader) and authenticated user name (root) do not match
2017-06-27 19:10:10 UTC [1188-2] mailreader@mail FATAL: Peer authentication failed for user "mailreader"
2017-06-27 19:10:10 UTC [1188-3] mailreader@mail DETAIL: Connection matched pg_hba.conf line 90: "local all all peer"发布于 2017-06-27 19:13:29
最后,我不得不评论这句话:
local all all peer或者把它放在下面这一行:
local mail all ident map=mailmaphttps://dba.stackexchange.com/questions/177142
复制相似问题