【问题标题】:In PostgreSQL, how to accept *any* password for the user "postgres"?在 PostgreSQL 中,如何接受用户“postgres”的 *any* 密码?
【发布时间】:2020-08-10 18:39:15
【问题描述】:

我正在同时处理许多项目,其中一些将一些密码定义为默认密码,这些密码可能因项目而异。我的(Ubuntu)笔记本电脑上安装了 postgresql,当然我只是在本地使用它进行开发。

我知道它非常不安全,但我不会远程公开 postgres。因此,为了让事情变得更容易,我希望 postgresql 服务器接受它为 postgres 用户提供的任何密码。有什么办法可以做到吗?

【问题讨论】:

    标签: postgresql security authentication passwords


    【解决方案1】:

    为 pg_hba.conf 中的所有本地连接设置信任,例如

    local   all             all                                     trust
    

    编辑完成后,重启postgresql服务。

    披露:我为EnterpriseDB (EDB)工作

    【讨论】:

    • 对于想知道在哪里可以找到他们的pg_hba.conf 的人,请运行psql -U postgres -c 'SHOW config_file' 来找到它。
    猜你喜欢
    • 2014-01-30
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2020-06-21
    • 2012-09-25
    • 2012-08-15
    • 1970-01-01
    相关资源
    最近更新 更多