PostgreSQL 9.2.4
我不能再与以前工作的用户登录了。我假设配置问题。因此,对于测试,我创建了一个测试用户角色'测试'使用与相关角色相同的选项(作为仍然可以登录的' postgres'用户):
CREATE ROLE testing WITH 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
有没有人知道问题可能是什么?
答案 0 :(得分:0)
主要问题是对于尝试登录的数据库角色,linux用户不存在。还有一些其他的小配置问题(linux组,权限)需要修复。然后再次登录。