在openldap預設裡是沒有memberof這個overlay,要自己去手動新增,可參考 此篇 。 First install the openldap package sudo apt-get install slapd Then add the memberOf module and overlay to the schema. vi member.ldif Add the following to the file: dn: cn=module,cn=config cn: module objectclass: olcModuleList objectclass: top olcmoduleload: memberof.la olcmodulepath: /usr/lib/ldap dn: olcOverlay={0}memberof,olcDatabase={1}hdb,cn=config objectClass: olcConfig objectClass: olcMemberOf objectClass: olcOverlayConfig objectClass: top olcOverlay: memberof P.S. 要自己切換成BDB,HDB,MDB 我是用mdb所以要改成{1}mdb,下面也是 Save the file and add it to the OpenLDAP config with the following command: ldapadd -Y EXTERNAL -H ldapi:/// -f member.ldif [AdSense-B] Add referential integrety to the ldap config vi refint.ldif Add the following to the file: dn: cn=module,cn=config cn: module objectclass: olcModuleList objectclass: top olcmoduleload: refint.la olcmodulepath: /usr/lib/ldap dn: olcOverlay={1}refint,olcDatab...