<div dir="ltr">Hi<br> I am trying to setup pgpool with LDAP authentication, but when I try to login I with an user I got this message:<br> # PGPASSWORD=admin psql -U admin -h localhost<br>psql: ERROR:  failed to authenticate with backend using md5<br><div>DETAIL:  valid password not found</div><br><div>In the LDAP server I can see the request from pgpool and none is returned with an error. <br></div><div><br></div>If I use a wrong password, I got the the following error, which is right:<br> # PGPASSWORD=adm psql -U admin -h localhost<br>psql: FATAL:  failed authentication against PAM<br><div>DETAIL:  pam_authenticate failed: Authentication failure</div><div><br></div>I have added the user to the pool_passwd file, and then it works. It seems, that even when PAM authenticate the user pgpool still tries to re-validate the password against the pool_passwd file.<br><div><br></div><div>Am I missing something ? Do I need to set any other parameter ?</div><div>If this is not the right place to post this questions, please point me to right place.</div><div><br></div>Thanks forehand.<br><div><br></div><div>----8&lt;-------------------<br></div><div></div><div>Logs messages:</div><div><br></div><div>The pgpool log is:</div>2019-10-16 14:29:37: pid 336: WARNING:  unable to get password, password file descriptor is NULL<br>2019-10-16 14:29:37: pid 336: ERROR:  failed to authenticate with backend using md5<br>2019-10-16 14:29:37: pid 336: DETAIL:  valid password not found<br><div><br></div><div>The ldap log is:</div>5da7261e conn=1020 op=7 SRCH base=&quot;dc=example,dc=org&quot; scope=2 deref=0 filter=&quot;(&amp;(objectClass=posixAccount)(uid=admin))&quot;<br>5da7261e conn=1020 op=7 SRCH attr=uid uidNumber<br>5da7261e conn=1020 op=7 SEARCH RESULT tag=101 err=0 nentries=1 text=<br>5da7261e conn=1022 fd=22 ACCEPT from IP=<a href="http://172.28.0.6:51814">172.28.0.6:51814</a> (IP=<a href="http://0.0.0.0:389">0.0.0.0:389</a>)<br>5da7261e conn=1022 op=0 BIND dn=&quot;cn=admin,dc=example,dc=org&quot; method=128<br>5da7261e conn=1022 op=0 BIND dn=&quot;cn=admin,dc=example,dc=org&quot; mech=SIMPLE ssf=0<br>5da7261e conn=1022 op=0 RESULT tag=97 err=0 text=<br>5da7261e conn=1022 op=1 SRCH base=&quot;cn=admin,dc=example,dc=org&quot; scope=0 deref=0 filter=&quot;(objectClass=*)&quot;<br>5da7261e conn=1022 op=1 SRCH attr=dn<br>5da7261e conn=1022 op=1 SEARCH RESULT tag=101 err=0 nentries=1 text=<br>5da7261e conn=1022 op=2 ABANDON msg=2<br>5da7261e conn=1022 op=3 UNBIND<br>5da7261e conn=1022 fd=22 closed<br>5da7261e conn=1020 op=8 SRCH base=&quot;dc=example,dc=org&quot; scope=2 deref=0 filter=&quot;(&amp;(objectClass=shadowAccount)(uid=admin))&quot;<br>5da7261e conn=1020 op=8 SRCH attr=shadowExpire shadowInactive shadowFlag shadowWarning shadowLastChange uid shadowMin shadowMax<br>5da7261e conn=1020 op=8 SEARCH RESULT tag=101 err=0 nentries=1 text=<br>5da7261e conn=1020 op=9 ABANDON msg=9<br>5da7261e conn=1020 op=10 SRCH base=&quot;dc=example,dc=org&quot; scope=2 deref=0 filter=&quot;(&amp;(objectClass=posixAccount)(uid=admin))&quot;<br>5da7261e conn=1020 op=10 SRCH attr=uid uidNumber<br>5da7261e conn=1020 op=10 SEARCH RESULT tag=101 err=0 nentries=1 text=<br>5da7261e conn=1020 op=11 SRCH base=&quot;dc=example,dc=org&quot; scope=2 deref=0 filter=&quot;(&amp;(objectClass=shadowAccount)(uid=admin))&quot;<br>5da7261e conn=1020 op=11 SRCH attr=shadowExpire shadowInactive shadowFlag shadowWarning shadowLastChange uid shadowMin shadowMax<br>5da7261e conn=1020 op=11 SEARCH RESULT tag=101 err=0 nentries=1 text=<br>5da7261e conn=1020 op=12 ABANDON msg=12<br><div><br></div><div>The nslcd log is:</div>nslcd: DEBUG: accept() failed (ignored): Resource temporarily unavailable<br>nslcd: [e87ccd] DEBUG: connection from pid=336 uid=888 gid=888<br>nslcd: [e87ccd] &lt;authc=&quot;admin&quot;&gt; DEBUG: nslcd_pam_authc(&quot;admin&quot;,&quot;mysqld&quot;,&quot;***&quot;)<br>nslcd: [e87ccd] &lt;authc=&quot;admin&quot;&gt; DEBUG: myldap_search(base=&quot;dc=example,dc=org&quot;, filter=&quot;(&amp;(objectClass=posixAccount)(uid=admin))&quot;)<br>nslcd: [e87ccd] &lt;authc=&quot;admin&quot;&gt; DEBUG: ldap_initialize(ldap://ldap)<br>nslcd: DEBUG: accept() failed (ignored): Resource temporarily unavailable<br>nslcd: DEBUG: accept() failed (ignored): Resource temporarily unavailable<br>nslcd: DEBUG: accept() failed (ignored): Resource temporarily unavailable<br>nslcd: [e87ccd] &lt;authc=&quot;admin&quot;&gt; DEBUG: ldap_set_rebind_proc()<br>nslcd: [e87ccd] &lt;authc=&quot;admin&quot;&gt; DEBUG: ldap_set_option(LDAP_OPT_PROTOCOL_VERSION,3)<br>nslcd: [e87ccd] &lt;authc=&quot;admin&quot;&gt; DEBUG: ldap_set_option(LDAP_OPT_DEREF,0)<br>nslcd: [e87ccd] &lt;authc=&quot;admin&quot;&gt; DEBUG: ldap_set_option(LDAP_OPT_TIMELIMIT,0)<br>nslcd: [e87ccd] &lt;authc=&quot;admin&quot;&gt; DEBUG: ldap_set_option(LDAP_OPT_TIMEOUT,0)<br>nslcd: [e87ccd] &lt;authc=&quot;admin&quot;&gt; DEBUG: ldap_set_option(LDAP_OPT_NETWORK_TIMEOUT,0)<br>nslcd: [e87ccd] &lt;authc=&quot;admin&quot;&gt; DEBUG: ldap_set_option(LDAP_OPT_REFERRALS,LDAP_OPT_ON)<br>nslcd: [e87ccd] &lt;authc=&quot;admin&quot;&gt; DEBUG: ldap_set_option(LDAP_OPT_RESTART,LDAP_OPT_ON)<br>nslcd: [e87ccd] &lt;authc=&quot;admin&quot;&gt; DEBUG: ldap_simple_bind_s(&quot;cn=admin,dc=example,dc=org&quot;,&quot;***&quot;) (uri=&quot;ldap://ldap&quot;)<br>nslcd: [e87ccd] &lt;authc=&quot;admin&quot;&gt; DEBUG: ldap_result(): cn=admin,dc=example,dc=org<br>nslcd: [e87ccd] &lt;authc=&quot;admin&quot;&gt; DEBUG: myldap_search(base=&quot;cn=admin,dc=example,dc=org&quot;, filter=&quot;(objectClass=*)&quot;)<br>nslcd: [e87ccd] &lt;authc=&quot;admin&quot;&gt; DEBUG: ldap_initialize(ldap://ldap)<br>nslcd: [e87ccd] &lt;authc=&quot;admin&quot;&gt; DEBUG: ldap_set_rebind_proc()<br>nslcd: [e87ccd] &lt;authc=&quot;admin&quot;&gt; DEBUG: ldap_set_option(LDAP_OPT_PROTOCOL_VERSION,3)<br>nslcd: [e87ccd] &lt;authc=&quot;admin&quot;&gt; DEBUG: ldap_set_option(LDAP_OPT_DEREF,0)<br>nslcd: [e87ccd] &lt;authc=&quot;admin&quot;&gt; DEBUG: ldap_set_option(LDAP_OPT_TIMELIMIT,0)<br>nslcd: [e87ccd] &lt;authc=&quot;admin&quot;&gt; DEBUG: ldap_set_option(LDAP_OPT_TIMEOUT,0)<br>nslcd: [e87ccd] &lt;authc=&quot;admin&quot;&gt; DEBUG: ldap_set_option(LDAP_OPT_NETWORK_TIMEOUT,0)<br>nslcd: [e87ccd] &lt;authc=&quot;admin&quot;&gt; DEBUG: ldap_set_option(LDAP_OPT_REFERRALS,LDAP_OPT_ON)<br>nslcd: [e87ccd] &lt;authc=&quot;admin&quot;&gt; DEBUG: ldap_set_option(LDAP_OPT_RESTART,LDAP_OPT_ON)<br>nslcd: [e87ccd] &lt;authc=&quot;admin&quot;&gt; DEBUG: ldap_simple_bind_s(&quot;cn=admin,dc=example,dc=org&quot;,&quot;***&quot;) (uri=&quot;ldap://ldap&quot;)<br>nslcd: [e87ccd] &lt;authc=&quot;admin&quot;&gt; DEBUG: ldap_result(): cn=admin,dc=example,dc=org<br>nslcd: [e87ccd] &lt;authc=&quot;admin&quot;&gt; DEBUG: ldap_unbind()<br>nslcd: [e87ccd] &lt;authc=&quot;admin&quot;&gt; DEBUG: bind successful<br>nslcd: [e87ccd] &lt;authc=&quot;admin&quot;&gt; DEBUG: myldap_search(base=&quot;dc=example,dc=org&quot;, filter=&quot;(&amp;(objectClass=shadowAccount)(uid=admin))&quot;)<br>nslcd: [e87ccd] &lt;authc=&quot;admin&quot;&gt; DEBUG: ldap_result(): cn=admin,dc=example,dc=org<br>nslcd: DEBUG: accept() failed (ignored): Resource temporarily unavailable<br>nslcd: DEBUG: accept() failed (ignored): Resource temporarily unavailable<br>nslcd: [1b58ba] DEBUG: connection from pid=336 uid=888 gid=888<br>nslcd: DEBUG: accept() failed (ignored): Resource temporarily unavailable<br>nslcd: [1b58ba] &lt;authz=&quot;admin&quot;&gt; DEBUG: nslcd_pam_authz(&quot;admin&quot;,&quot;mysqld&quot;,&quot;&quot;,&quot;&quot;,&quot;&quot;)<br>nslcd: [1b58ba] &lt;authz=&quot;admin&quot;&gt; DEBUG: myldap_search(base=&quot;dc=example,dc=org&quot;, filter=&quot;(&amp;(objectClass=posixAccount)(uid=admin))&quot;)<br>nslcd: [1b58ba] &lt;authz=&quot;admin&quot;&gt; DEBUG: ldap_result(): cn=admin,dc=example,dc=org<br>nslcd: [1b58ba] &lt;authz=&quot;admin&quot;&gt; DEBUG: myldap_search(base=&quot;dc=example,dc=org&quot;, filter=&quot;(&amp;(objectClass=shadowAccount)(uid=admin))&quot;)<br>nslcd: [1b58ba] &lt;authz=&quot;admin&quot;&gt; DEBUG: ldap_result(): cn=admin,dc=example,dc=org<br><div><br></div><div><br></div><div>Configuration files are:</div>pg_hba.conf:<br> local    all             all                            trust<br> host     all             replication_user   all         trust<br> host     all             all                all         pam pamservice=postgresql<br><div><br></div><div>pgpool.conf:</div>...<br> # - Authentication -<br>enable_pool_hba = on<br>pool_passwd = &#39;&#39;<br>#pool_passwd = &#39;pool_passwd&#39;<br><div>...</div><div><br></div><div><br></div></div>