仅使用密码连接到 postgresql

Connecting to postgresql with password only

我使用来自 postgresql.org 的 Debian Postgresql 存储库安装了 Postgresql 9.5,然后启用了远程连接。后来我使用以下

向 postgres 用户添加了密码
su - postgres
psql
\password postgres

我确实成功设置了密码,但我仍然可以在不提供密码的情况下使用 pgadmin3 连接到 postgresql。

我在这个过程中错过了什么?

我发现了问题。在我的 pg_hba.conf 最后我有

host all all 0.0.0.0/0 trust

我改成了

host all all 0.0.0.0/0 md5

现在它要求输入密码