首页 > 解决方案 > 如何在 PostgreSQL LDAP 身份验证中隐藏 ldapbindpasswd?

问题描述

我已将以下内容添加到pg_hba.confLDAP 身份验证工作。

host all all 0.0.0.0/0  ldap ldapserver=ldap.p***ad.com ldapbasedn="ou=US,ou=NA,dc=p***ad,dc=com" ldapbinddn="cn=LOEM,OU=Some Accounts,OU=Enterprise Mgmt,OU=NA,dc=p***ad,dc=com" ldapbindpasswd="*****" ldapsearchattribute=sAMAccountName

但我不想以纯文本形式留下密码。有没有办法不包括ldapbindpasswd在内pg_hba.conf

标签: postgresqlauthenticationldap

解决方案


你不能这样做。

我建议您将 LDAP 服务器配置为匿名绑定以搜索此信息,然后您不需要密码。


推荐阅读