欢迎各位兄弟 发布技术文章

这里的技术是共享的

You are here

[笔记]Drupal整合LDAP之作法

[笔记]Drupal整合LDAP之作法

本篇笔记主要记录,Drupal 网站若要藉由LDAP进行认证之整合之实际作法(以整合北市国小校务行政之LDAP服务为例)

1. 首先安装相关模组,专案网址:http://drupal.org/project/ldap   (目前为7.x-2.0-beta3)

drush dl ldap

(Project ldap contains 14 modules: ldap_sso, ldap_authorization_og, ldap_authorization_drupal_role, ldap_authorization, ldap_servers, ldap_views, ldap_feeds, ldap_ad_basic, ldap_ad_provision_ldap_users, ldap_help, ldap_user, ldap_authentication, ldap_query, ldap_test.)

2. 启用:LDAP Authentication、LDAP Authorization、LDAP Authorization – Drupal Roles、LDAP Servers 、LDAP User Modules 等模组。

3. 必备资讯(LDAP 相关)

  • LDAP Server 的IP or Domain Name

  • DN for non-anonymous search –> cn=root,dc=developer,dc=alle,dc=com

  • Base DNs for LDAP users, groups, and other entries this server configuration. –> dc=developer,dc=alle,dc=com

  • password for LDAP search

4. 设定LDAP Server

请由管理工具列─设定─使用者─LDAP Configuration 进入

  1. 依照其订定之顺序来进行设定,Setting 的部分维持预设,直接按储存继续。 

  2. Server部分,请依下列资讯进行设定:

LDAP server 栏位中填入您的LDAP server IP 或Domain Name 

DN for non-anonymous serch 填入「cn=root,dc=developer,dc=alle,dc=com」
记得输入LDAP的密码

Base DNs for LDAP users…. 填入「dc=developer,dc=alle,dc=com」
AuthName attribute 填入「uid」
Email attribute 填入「mail」

按下储存,就完成Server的设定,从以下列表中,您可以按test 来进行测试,无误之后将他enable 基本上就可以与LDAP连线。ldap2-4

  1. 接着进行3.USER 的设定ldap3-1

  2. 基本上维持不动,只要调整第二项,选择前面enable 的伺服器来连接,接下来会出现一大堆选项,基本上维持预设即可,若有栏位要对应再来详细研究

  3. 到此,应该已经完成LDAP的对应,LDAP上的USER可以直接login进Drupal系统了

LDAP模组的功能愈来愈多,需要设定的地方也愈来愈复杂,有需要者再自行研究,先分享至此~

来自  https://project.zhps.tp.edu.tw/ethan/2013/02/drupal-ldap/


普通分类: