MariaDB LDAP PAM 身份验证

问题描述

我的本​​地测试环境中有一个 Active Directory 和一个 MariaDB 服务器。现在我想让MariaDB下的AD用户登录成为可能。

我已经看过一些教程,这里有几乎所有关于它的主题

我的/etc/nslc.conf:

    uid nslcd
    gid nslcd
    uri ldap://172.29.210.219/
    base dc=saptest,dc=local
    ldap_version 3
    binddn CN=bind,CN=Users,DC=SAPTEST,DC=LOCAL
    bindpw supersecurepassword
    ssl off
    filter passwd (objectClass=user)
    map passwd uid sAMAccountName

我的/etc/pam.d/mariadb

auth sufficient pam_ldap.so
account sufficient pam_ldap.so

我在 MariaDB 中的步骤

INSTALL SONAME 'auth_pam';
CREATE USER 'admin'@'%' IDENTIFIED VIA pam USING 'mariadb';
GRANT ALL ON *.* TO 'admin'@'%';
FLUSH PRIVILEGES;
EXIT;

当我执行“MysqL -u admin -p”时出现以下错误

ERROR 1045 (28000): Access denied for user 'admin'@'localhost' (using password: NO)

非常感谢。

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)