Changes between Version 19 and Version 20 of ldap


Ignore:
Timestamp:
Nov 28, 2016, 10:33:09 AM (8 years ago)
Author:
admin
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • ldap

    v19 v20  
    55== Setting the Hostname and FQDN ==
    66
    7 Remember this VM is a clone of your pc.instX.ws.ac.lk. Therefore you have to change some settings in order to make this vm unique.
     7Remember this VM is a clone of your pc.instX.ws.learn.ac.lk. Therefore you have to change some settings in order to make this vm unique.
    88
    99=== Setting up hostname ===
     
    2020   * Change '''pc''' to '''idp'''
    2121   * Save and Exit
    22  - also edit /etc/hosts file to change 127.0.0.1 pc."your domain".ws.ac.lk pc to 127.0.0.1 idp."your domain".ws.ac.lk  idp
     22 - also edit /etc/hosts file to change 127.0.0.1 pc."your domain".ws.ac.lk pc to 127.0.0.1 idp."your domain".ws.learn.ac.lk  idp
    2323
    2424=== IP Set up ===
     
    8686
    8787  - Omit OpenLDAP server configuration? '''No''' (we want an initial database and configuration)
    88   - DNS domain name: '''"your domain".ws.ac.lk''' (use the server's domain name, minus the hostname. This will be used to create the base entry for the information tree)
     88  - DNS domain name: '''"your domain".ws.learn.ac.lk''' (use the server's domain name, minus the hostname. This will be used to create the base entry for the information tree)
    8989  - Organization name: '''Example Inc''' (This will simply be added to the base entry as the name of your institute)
    9090  - Administrator password: '''[whatever you'd like]'''
     
    153153{{{
    154154organization = "Name of your institution"
    155 cn = idp.'your domain'.ws.ac.lk
     155cn = idp.'your domain'.ws.learn.ac.lk
    156156tls_www_server
    157157encryption_key
     
    329329}}}
    330330
    331 Now, if you search the '''dc='your domain'dc=ws,dc=ac,dc=lk''' DIT, you will be refused if you do not use the -Z option to initiate a STARTTLS upgrade:
     331Now, if you search the '''dc='your domain'dc=ws,dc=learn,dc=ac,dc=lk''' DIT, you will be refused if you do not use the -Z option to initiate a STARTTLS upgrade:
    332332
    333333{{{
     
    346346TLS required success
    347347{{{
    348 dn: dc='your domain'dc=ws,dc=ac,dc=lk
    349 dn: cn=admin,dc='your domain'dc=ws,dc=ac,dc=lk
     348dn: dc='your domain'dc=ws,dc=learn,dc=ac,dc=lk
     349dn: cn=admin,dc='your domain'dc=ws,dc=learn,dc=ac,dc=lk
    350350}}}
    351351
     
    358358Open a new file named as initial.ldif using nano or vi editor. Then copy following ldif content and do necessary adjustments to match with you institute.
    359359{{{
    360 # group, 'your domain'.ws.ac.lk
    361 dn: ou=group,dc='your domain'dc=ws,dc=ac,dc=lk
     360# group, 'your domain'.ws.learn.ac.lk
     361dn: ou=group,dc='your domain'dc=ws,dc=learn,dc=ac,dc=lk
    362362description: learn groups
    363363objectClass: top
    364364objectClass: organizationalUnit
    365365ou: group
    366 # adm staf, group, 'your domain'.ws.ac.lk
    367 dn: cn=adm,ou=group,dc='your domain'dc=ws,dc=ac,dc=lk
     366# adm staf, group, 'your domain'.ws.learn.ac.lk
     367dn: cn=adm,ou=group,dc='your domain'dc=ws,dc=learn,dc=ac,dc=lk
    368368cn: adm
    369369description: System Admin Staff
     
    372372objectClass: top
    373373
    374 # acadamic staf, group, 'your domain'.ws.ac.lk
    375 dn: cn=acd,ou=group,dc='your domain'dc=ws,dc=ac,dc=lk
     374# acadamic staf, group, 'your domain'.ws.learn.ac.lk
     375dn: cn=acd,ou=group,dc='your domain'dc=ws,dc=learn,dc=ac,dc=lk
    376376cn: acd
    377377description: Acadamic Staff
     
    380380objectClass: top
    381381
    382 # students, group, 'your domain'.ws.ac.lk
    383 dn: cn=std,ou=group,dc='your domain'dc=ws,dc=ac,dc=lk
     382# students, group, 'your domain'.ws.learn.ac.lk
     383dn: cn=std,ou=group,dc='your domain'dc=ws,dc=learn,dc=ac,dc=lk
    384384cn: std
    385385description: Students
     
    388388objectClass: top
    389389
    390 # servers, 'your domain'.ws.ac.lk
    391 dn: ou=servers,dc='your domain'dc=ws,dc=ac,dc=lk
     390# servers, 'your domain'.ws.learn.ac.lk
     391dn: ou=servers,dc='your domain'dc=ws,dc=learn,dc=ac,dc=lk
    392392description: servers
    393393objectClass: top
     
    395395ou: servers
    396396
    397 # idp, servers, 'your domain'.ws.ac.lk
    398 dn: cn=idp,ou=servers,dc='your domain'dc=ws,dc=ac,dc=lk
     397# idp, servers, 'your domain'.ws.learn.ac.lk
     398dn: cn=idp,ou=servers,dc='your domain'dc=ws,dc=learn,dc=ac,dc=lk
    399399cn: idp
    400400description: Identity Server
     
    406406userPassword: {crypt}idpldap
    407407
    408 # www, servers, 'your domain'.ws.ac.lk
    409 dn: cn=www,ou=servers,dc='your domain'dc=ws,dc=ac,dc=lk
     408# www, servers, 'your domain'.ws.learn.ac.lk
     409dn: cn=www,ou=servers,dc='your domain'dc=ws,dc=learn,dc=ac,dc=lk
    410410cn: irs
    411411description: IRS Server
     
    417417userPassword: {crypt}wwwsvr
    418418
    419 # people, 'your domain'.ws.ac.lk
    420 dn: ou=people,dc='your domain'dc=ws,dc=ac,dc=lk
     419# people, 'your domain'.ws.learnac.lk
     420dn: ou=people,dc='your domain'dc=ws,dc=learn,dc=ac,dc=lk
    421421description: inst users
    422422objectClass: top
     
    424424ou: people
    425425
    426 # testme, people, 'your domain'.ws.ac.lk
    427 dn: uid=testme,ou=people,dc='your domain'dc=ws,dc=ac,dc=lk
     426# testme, people, 'your domain'.ws.learn.ac.lk
     427dn: uid=testme,ou=people,dc='your domain'dc=ws,dc=learn,dc=ac,dc=lk
    428428cn: Test Me
    429429departmentNumber: LEARN
     
    467467
    468468{{{
    469 ldapadd -H ldap:// -x -D "cn=admin,dc='your domain'dc=ws,dc=ac,dc=lk" -W -Z -f initial.ldif
     469ldapadd -H ldap:// -x -D "cn=admin,dc='your domain'dc=ws,dc=learn,dc=ac,dc=lk" -W -Z -f initial.ldif
    470470}}}
    471471
     
    473473
    474474{{{
    475 ldapsearch -H ldap:// -x -D "cn=admin,dc='your domain'dc=ws,dc=ac,dc=lk" -W -Z -b "dc='your domain'dc=ws,dc=ac,dc=lk"
     475ldapsearch -H ldap:// -x -D "cn=admin,dc='your domain'dc=ws,dc=learn,dc=ac,dc=lk" -W -Z -b "dc='your domain'dc=ws,dc=learn,dc=ac,dc=lk"
    476476}}}
    477477Note that Clear-Text userPassword enconded in '''base64'''
     
    480480
    481481{{{
    482 ldapdelete -H ldap:// "uid=user,ou=people,dc='your domain'dc=ws,dc=ac,dc=lk" -D "cn=admin,dc='your domain'dc=ws,dc=ac,dc=lk" -Z -W
     482ldapdelete -H ldap:// "uid=user,ou=people,dc='your domain'dc=ws,dc=learn,dc=ac,dc=lk" -D "cn=admin,dc='your domain'dc=ws,dc=learn,dc=ac,dc=lk" -Z -W
    483483}}}
    484484
     
    494494changetype: modify
    495495replace: olcAccess
    496 olcAccess: {0}to attrs=userPassword by self write by anonymous auth by dn.children="ou=servers,dc='your domain'dc=ws,dc=ac,dc=lk" read by * none
     496olcAccess: {0}to attrs=userPassword by self write by anonymous auth by dn.children="ou=servers,dc='your domain'dc=ws,dc=learn,dc=ac,dc=lk" read by * none
    497497olcAccess: {1}to attrs=shadowLastChange by self write by * read
    498498olcAccess: {2}to * by * read
     
    521521{{{
    522522$servers->setValue('server','host','localhost');
    523 $servers->setValue('server','base',array('dc='your domain'dc=ws,dc=ac,dc=lk'));
    524 $servers->setValue('login','bind_id','cn=admin,dc='your domain'dc=ws,dc=ac,dc=lk');
     523$servers->setValue('server','base',array('dc='your domain'dc=ws,dc=learn,dc=ac,dc=lk'));
     524$servers->setValue('login','bind_id','cn=admin,dc='your domain'dc=ws,dc=learn,dc=ac,dc=lk');
    525525$config->custom->appearance['hide_template_warning'] = true;
    526526$servers->setValue('server','tls',true);
     
    571571{{{
    572572<VirtualHost *:80/>
    573 ServerAdmin webmaster@'your domain'.ws.ac.lk
     573ServerAdmin webmaster@'your domain'.ws.learn.ac.lk
    574574DocumentRoot /var/www/html
    575 ServerName idp.'your domain'.ws.ac.lk
    576 Redirect permanent /phpldapadmin https://'your domain'.ws.ac.lk/phpldapadmin
     575ServerName idp.'your domain'.ws.learn.ac.lk
     576Redirect permanent /phpldapadmin https://'your domain'.ws.learn.ac.lk/phpldapadmin
    577577ErrorLog ${APACHE_LOG_DIR}/error.log
    578578CustomLog ${APACHE_LOG_DIR}/access.log combined
     
    601601
    602602{{{
    603 ServerAdmin webmaster@'your domain'.ws.ac.lk
    604 ServerName idp.'your domain'.ws.ac.lk
     603ServerAdmin webmaster@'your domain'.ws.learn.ac.lk
     604ServerName idp.'your domain'.ws.learn.ac.lk
    605605}}}
    606606Next, we need to set the SSL certificate directives to point to the key and certificate that we created. The directives should already exist in your file, so just modify the files they point to: