PostgreSQL 9.2.4
我无法再使用过去工作过的用户登录。我假设配置问题。因此,为了进行测试,我创建了一个测试用户角色“testing”,其选项与所讨论的角色相同(作为仍然可以登录的“postgres”用户!):
使用 SUPERUSER NOCREATEDB NOCREATEROLE LOGIN PASSWORD 'pw' 创建角色测试;
角色创建成功:
List of roles Role name | Attributes | Member of ------------+------------------------------------------------+----------- postgres | Superuser, Create role, Create DB, Replication | {} testing | Superuser | {} ...
但是,登录会导致此消息:
# psql -h 127.0.0.1 -p 5434 -U testing Password for user testing: psql: FATAL: PAM authentication failed for user "testing" FATAL: PAM authentication failed for user "testing"
当我尝试使用原始角色时,我也会遇到此错误。
pg_hba.conf:
# "local" is for Unix domain socket connections only local all all pam # IPv4 local connections: host all all 0.0.0.0/0 pam
有人知道问题出在哪里吗?
最佳答案
主要问题是尝试登录的数据库角色的 linux 用户不存在。还有一些其他的小配置问题(linux 组、权限)需要修复。然后可以再次登录。
关于postgresql - psql : FATAL: PAM authentication failed for user,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27544308/