Sorry I am a layman. I don't know much about PAM or MariaDB or LDAP. I am doing my school project for which i need to authenticate the user from my college server (which is having the passwords and usernames). They suggested me that i might connect to college server using LDAP and PAM . So i installed php for dealing with my project and also php-ldap, pam. But now my problem is to use PAM and LDAP to connect to the server and authenticate users. Thanks for answering my problem.