Browse Source

add memberof to ldap

python3
Andrea Cimbalo 8 years ago
parent
commit
cdd797ddfa
3 changed files with 21 additions and 2 deletions
  1. +6
    -0
      roles/ldap/tasks/main.yaml
  2. +10
    -2
      roles/ldap/templates/default_tree.ldif.j2
  3. +5
    -0
      roles/ldap/templates/slapd.conf.j2

+ 6
- 0
roles/ldap/tasks/main.yaml View File

@ -63,6 +63,12 @@
become_method: sudo become_method: sudo
become_user: openldap become_user: openldap
notify: restart slapd notify: restart slapd
- name: fix missing memberOf module load
lineinfile:
dest: /etc/ldap/slapd.d/cn=config/cn=module{0}.ldif
line: "olcModuleLoad: {1}memberof"
notify: restart slapd
- name: upload default tree - name: upload default tree
template: template:
dest=/etc/ldap/default_tree.ldif dest=/etc/ldap/default_tree.ldif


+ 10
- 2
roles/ldap/templates/default_tree.ldif.j2 View File

@ -28,7 +28,6 @@ objectclass: top
structuralobjectclass: posixGroup structuralobjectclass: posixGroup
subschemasubentry: cn=Subschema subschemasubentry: cn=Subschema
# Entry 14: o=hosting,dc=lilik,dc=it # Entry 14: o=hosting,dc=lilik,dc=it
dn: o=hosting,dc=lilik,dc=it dn: o=hosting,dc=lilik,dc=it
description: mail.lilik.it hosting root description: mail.lilik.it hosting root
@ -113,7 +112,7 @@ gidnumber: 100
givenname: Test givenname: Test
hassubordinates: FALSE hassubordinates: FALSE
homedirectory: /home/test_user homedirectory: /home/test_user
loginshell: /bin/sh
loginshell: /bin/bash
mail: test_user mail: test_user
objectclass: top objectclass: top
objectclass: inetOrgPerson objectclass: inetOrgPerson
@ -133,3 +132,12 @@ userpassword: {SSHA}2SWroMDSWoIWlYEvzpHvSRK4PMsjGW/u
lastChange: 1228821387 lastChange: 1228821387
vdhome: undefined vdhome: undefined
mailbox: undefined mailbox: undefined
# Entry 12: cn=admin,o=Group,dc=lilik,dc=it
dn: cn=admin,o=Group,dc=lilik,dc=it
cn: admin
objectClass: groupOfNames
objectClass: top
structuralObjectClass: groupOfNames
member: cn=admin,dc=lilik,dc=it

+ 5
- 0
roles/ldap/templates/slapd.conf.j2 View File

@ -3,3 +3,8 @@ include /etc/ldap/schema/cosine.schema
include /etc/ldap/schema/nis.schema include /etc/ldap/schema/nis.schema
include /etc/ldap/schema/inetorgperson.schema include /etc/ldap/schema/inetorgperson.schema
include /etc/ldap/schema/phamm.schema include /etc/ldap/schema/phamm.schema
modulepath /usr/lib/ldap
moduleload memberof.la
overlay memberof

Loading…
Cancel
Save