Changes between Version 15 and Version 16 of ldapiam2018


Ignore:
Timestamp:
Sep 12, 2018, 7:09:12 PM (6 years ago)
Author:
admin
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • ldapiam2018

    v15 v16  
    215215description: All groups
    216216
    217 dn: cn=adm,ou=Group,dc=instXY,dc=ac,dc=lk
    218 cn: adm
    219 description: System Admin Staff
    220 gidNumber: 1500
    221 objectClass: posixGroup
    222 objectClass: top
    223 
    224 dn: cn=acd,ou=Group,dc=instXY,dc=ac,dc=lk
    225 cn: acd
    226 description: Acadamic Staff
    227 gidNumber: 2000
    228 objectClass: posixGroup
    229 objectClass: top
    230 
    231 dn: cn=student,ou=Group,dc=instXY,dc=ac,dc=lk
    232 cn: student
    233 description: Students
    234 gidNumber: 5000
    235 objectClass: posixGroup
    236 objectClass: top
    237 
    238 dn: ou=servers,dc=instXY,dc=ac,dc=lk
     217dn: ou=Servers,dc=instXY,dc=ac,dc=lk
    239218description: servers
    240219objectClass: top
     
    242221ou: servers
    243222
    244 dn: cn=idp,ou=servers,dc=instXY,dc=ac,dc=lk
     223dn: cn=idp,ou=servers,dc=inst00,dc=ac,dc=lk
    245224cn: idp
    246225description: Identity Server
    247 ipHostNumber: 3ffe:ffff:ffff::9
     226ipHostNumber: 3ffe: ffff: ffff: : 9
    248227objectClass: top
    249228objectClass: device
     
    251230objectClass: simpleSecurityObject
    252231userPassword: {crypt}idpldap
    253 
    254 dn: uid=testme,ou=people,dc=instXY,dc=ac,dc=lk
     232}}}
     233
     234Save the above as a .ldif file and add it to your directory as
     235{{{
     236sudo ldapadd -H ldap:// -x -D "cn=admin,dc=instXY,dc=ac,dc=lk" -W -Z -f path_to_file.ldif
     237}}}
     238
     239When Creating Users and Groups there are several ways in linking them with each other. This makes easy to search users, their associated groups as well as the groups and their associated users.
     240
     241* Option 1: Create Posix Groups, define `gidNumber` and link user with it.
     242
     243{{{
     244dn: cn=adm,ou=Group,dc=instXY,dc=ac,dc=lk
     245cn: adm
     246description: System Admin Staff
     247gidNumber: 1000
     248objectClass: posixGroup
     249objectClass: top
     250
     251
     252dn: uid=testme1,ou=people,dc=instXY,dc=ac,dc=lk
    255253cn: Test Me
    256 uid: testme
     254uid: testme1
    257255uidNumber: 1001
    258256gidNumber: 1000
    259 givenName: Test Me
     257givenName: Test Me1
    260258homeDirectory: /dev/null
    261259homePhone: none
     
    272270mobile: +94791234567
    273271userPassword: testme
    274 mail: testme@instXY.ac.lk
    275 eduPersonAffiliation: member
    276 }}}
    277 
    278 Save the above as a .ldif file and add it to your directory as
    279 {{{
    280 sudo ldapadd -H ldap:// -x -D "cn=admin,dc=instXY,dc=ac,dc=lk" -W -Z -f path_to_file.ldif
    281 }}}
    282 
    283 More about federated attributes http://wiki.aaf.edu.au/tech-info/attributes
    284 
    285 More About SCHAC schema https://www.terena.org/activities/tf-emc2/docs/schac/schac-schema-IAD-1.3.0.pdf
     272mail: testme1@instXY.ac.lk
     273eduPersonAffiliation: staff
     274}}}
     275
     276* Option 2: Define `groupOfNames` with `memberOf` overlay. (recommended in edugain installations)
     277 
     278   To do this we need to create 3 .ldif files and import to the slapd.
     279
     280`memberof_config.ldif`
     281
     282{{{
     283dn: cn=module,cn=config
     284cn: module
     285objectClass: olcModuleList
     286olcModuleLoad: memberof
     287olcModulePath: /usr/lib/ldap
     288
     289dn: olcOverlay={0}memberof,olcDatabase={1}hdb,cn=config
     290objectClass: olcConfig
     291objectClass: olcMemberOf
     292objectClass: olcOverlayConfig
     293objectClass: top
     294olcOverlay: memberof
     295olcMemberOfDangling: ignore
     296olcMemberOfRefInt: TRUE
     297olcMemberOfGroupOC: groupOfNames
     298olcMemberOfMemberAD: member
     299olcMemberOfMemberOfAD: memberOf
     300}}}
     301
     302`refint1.ldif`
     303
     304{{{
     305dn: cn=module{1},cn=config
     306add: olcmoduleload
     307olcmoduleload: refint
     308}}}
     309
     310`refint2.ldif`
     311
     312{{{
     313dn: olcOverlay={1}refint,olcDatabase={1}hdb,cn=config
     314objectClass: olcConfig
     315objectClass: olcOverlayConfig
     316objectClass: olcRefintConfig
     317objectClass: top
     318olcOverlay: {1}refint
     319olcRefintAttribute: memberof member manager owner
     320}}}
     321
     322   To set up the memberof module and configure it, run this command:
     323
     324   `sudo ldapadd -Q -Y EXTERNAL -H ldapi:/// -f memberof_config.ldif`
     325
     326   To load and configure the refint module (Referential Integrity overlay)
     327
     328   `sudo ldapmodify -Q -Y EXTERNAL -H ldapi:/// -f refint1.ldif`
     329
     330   `sudo ldapadd -Q -Y EXTERNAL -H ldapi:/// -f refint2.ldif`
     331
     332   > Every group created before this module is enabled has to be deleted and remade in order for these changes to take effect. LDAP assigns a "member" attribute behind the scenes to existing users when creating a group.
     333
     334   `addgroup.idif`
     335
     336{{{
     337dn: cn=staff,ou=Group,dc=instXY,dc=ac,dc=lk
     338objectClass: groupofnames
     339cn: staff
     340description: All users
     341member: uid=testme1,ou=people,dc=instXY,dc=ac,dc=lk
     342}}}
     343
     344   >Make sure to add "member : user_dn" pair line for each user you want to add to this group.
     345
     346   Load group to the system by:
     347
     348   `sudo ldapadd -H ldap:// -x -D "cn=admin,dc=instXY,dc=ac,dc=lk" -W -Z -f addgroup.ldif`
     349
     350
     351
     352More details on federated attributes http://wiki.aaf.edu.au/tech-info/attributes
     353
     354More on SCHAC schema https://www.terena.org/activities/tf-emc2/docs/schac/schac-schema-IAD-1.3.0.pdf
     355