出于安全原因postgresql centos服务器不允许登录

时间:2013-10-06 02:31:37

标签: apache security authentication centos phppgadmin

我正在配置我的centos服务器。我安装了postgresqlphppgadmin

当我尝试以my_server_ip/phpPgAdmin

访问phppgadmin时

重定向到登录页面,当我尝试登录时收到错误

Login disallowed for security reasons

我甚至将extra_login_security更改为false并使用以下命令重新启动

/etc/init.d/httpd restart

service postgresql-9.2 restart

任何人都可以帮助我。

3 个答案:

答案 0 :(得分:69)

1)。打开 - > / etc / phppgadmin - >的config.inc.php

2)。将$conf['extra_login_security'] = true;更改为$conf['extra_login_security'] = false;

  

//如果额外的登录安全性为真,则通过phpPgAdmin登录,否则为   //密码或某些用户名(pgsql,postgres,root,   管理员)//将被拒绝。只有在你拥有时才设置为false   阅读FAQ并了解如何更改PostgreSQL的pg_hba.conf   启用//密码本地连接。

答案 1 :(得分:3)

我有同样的问题 - 也在CentOS上 - 并且没有运气将安全设置更改为false。

事实证明它没有使用我们预期的配置文件。


它使用: /usr/share/phpPgAdmin/conf/config.inc.php

而不是: /etc/phpPgAdmin/config.inc.php


即使RPM(phpPgAdmin-5.1-1.rhel6.noarch)安装了这两个......

我真的不明白为什么它有两个,除非在某处定义了覆盖...但我没有时间去研究它。我确定你没有理由不能用/ symlink(或硬链接)替换/ etc中的那个,尽管如果你试图卸载RPM会导致问题。但是,除非你已经死了,否则我不愿意把它放进/等等 - 以防万一。我确定他们并没有包含其中两个只是为了好玩;)

我知道这可能为时已晚,无法帮助您,但我今天遇到的事实意味着它可能会对某人有用:)

答案 2 :(得分:0)

您需要重新启动postgresql

systemctl restart postgresql

systemctl restart apache2