Apache2.4和LDAPw/ActiveDirectory
创始人
2024-09-05 05:30:25
0
  1. 首先需要安装并启用mod_authnz_ldap模块,可以使用以下命令进行安装:

sudo apt-get install libapache2-mod-authnz-ldap

  1. 在Apache的配置文件中添加以下内容:

LDAPTrustedGlobalCert CERT_BASE64 /path/to/cert/file.pem LDAPTrustedMode SSL LDAPVerifyServerCert on

LDAPReferrals off AuthType Basic AuthName "LDAP Authentication" AuthLDAPURL "ldap://example.com/dc=example,dc=com?sAMAccountName?sub?(objectClass=person)" AuthLDAPBindDN "cn=binduser,ou=users,dc=example,dc=com" AuthLDAPBindPassword "binduserpassword" Require valid-user

其中,LDAPTrustedGlobalCert、LDAPTrustedMode和LDAPVerifyServerCert用于配置SSL加密连接。LDAPReferrals off禁用重定向,AuthLDAPURL指定LDAP服务器的URL,AuthLDAPBindDN和AuthLDAPBindPassword指定绑定用户的DN和密码。

  1. 配置LDAP用户组

可以使用mod_authnz_ldap模块的Require ldap-group指令来限定LDAP组成员才能访问资源:

AuthType Basic AuthName "LDAP Authentication" AuthLDAPURL "ldap://example.com/dc=example,dc=com?sAMAccountName?sub?(objectClass=person)" AuthLDAPBindDN "cn=binduser,ou=users,dc=example,dc=com" AuthLDAPBindPassword "binduserpassword"

Require ldap-group cn=ldap_group,ou=groups,dc=example,dc=com

其中,Require ldap-group指定LDAP组的DN。

  1. 检查权限

可以使用“ldapsearch”等工具来检查LDAP服务器的连接、配置和组成员等情况:

ldapsearch -H ldap://ldap_server:389 -x -D "cn=binduser,ou=users,dc=example,dc=com" -w binduserpassword -b "dc=example,dc=com" "memberof=cn=ldap_group,ou=groups,dc=example,dc

相关内容

热门资讯

一起来探讨!wpk微扑克智能(... 大家肯定在之前wpk微扑克智能或者wpk微扑克智能中玩过一起来探讨!wpk微扑克智能(wepOke)...
推荐几款新版(WPK工具)外挂... 推荐几款新版(WPK工具)外挂透明挂辅助工具(透视)透视辅助(有挂教学)-哔哩哔哩需要回顾用户提供的...
今日焦点(Wepoke外挂)外... Wepoke外挂新手教程相关信息汇总(需添加指定薇757446909获取下载链接);今日焦点(Wep...
玩家必看教程(微扑克中牌率)外... 玩家必看教程(微扑克中牌率)外挂透明挂辅助工具(透视)竟然是真的有挂(2021已更新)(哔哩哔哩)1...
透视模拟器(wpk德州ai)外... 透视模拟器(wpk德州ai)外挂透明挂辅助app(辅助挂)透视辅助(确实有挂)-哔哩哔哩准备好在wp...
来一盘!德扑之星ai软件(we... 德扑之星ai软件赢率提升策略‌;来一盘!德扑之星ai软件(wepOke)外挂透明挂辅助脚本(辅助挂)...
透视了解(德扑之星)外挂透明挂... 透视了解(德扑之星)外挂透明挂辅助工具(透视)确实是真的有挂(2024已更新)(哔哩哔哩);科技安装...
查到实测(wepoke辅助)外... 查到实测(wepoke辅助)外挂透明挂辅助插件(辅助挂)透视辅助(有挂分析)-哔哩哔哩;玩家必备必赢...
透视黑科技(Wepoke安卓)... Wepoke安卓新手教程相关信息汇总(需添加指定薇757446909获取下载链接);透视黑科技(We...
记者揭秘(扑克时间)外挂透明挂... 记者揭秘(扑克时间)外挂透明挂辅助挂(辅助挂)透视辅助(有挂解密)-哔哩哔哩;原来确实真的有挂(需添...