# PAM doesn't work in xtradb cluster

**URL:** <https://forums.percona.com/t/pam-doesnt-work-in-xtradb-cluster/6882>\
**Category:** Percona XtraDB Cluster 5.x\
**Created:** [March 4, 2019, 9:19am UTC](https://forums.percona.com/t/pam-doesnt-work-in-xtradb-cluster/6882 "2019-03-04T09:19:30Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![yassinec](https://avatars.discourse-cdn.com/v4/letter/y/ba8739/32.png) [@yassinec](https://forums.percona.com/u/yassinec)\
**Post date:** [March 4, 2019, 9:19am UTC](https://forums.percona.com/t/pam-doesnt-work-in-xtradb-cluster/6882/1 "2019-03-04T09:19:30Z")

</div>

Hello,  
I tried to connect xtradb cluster with ldap, so i installed auth\_pam plugin and authconfig and i configured the files mysql, nslcd.conf.

cat /etc/pam.d/mysql

auth [success=1 new\_authtok\_reqd=1 default=ignore] pam\_unix.so audit\_log audit  
auth required pam\_ldap.so try\_first\_pass debug audit\_log audit  
auth required pam\_user\_map.so debug audit\_log audit  
account sufficient pam\_unix.so audit debug audit\_log audit  
account required pam\_ldap.so debug audit\_log audit

cat /etc/nslcd.conf

filter passwd (uid=\*)  
uri ldap://172.17.0.7  
base ou=people,dc=yassinec,dc=com  
ssl no

i tested ldapsearch -x and it works but when i use mysql -u … to connect with a user on ldap, it gaves this error:

ERROR 1045 (28000): Access denied for user ‘yassinec’@‘localhost’ (using password: YES)

Thank you in advance,
