Changes between Version 19 and Version 20 of ldap
- Timestamp:
- Nov 28, 2016, 10:33:09 AM (8 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
ldap
v19 v20 5 5 == Setting the Hostname and FQDN == 6 6 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.7 Remember 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. 8 8 9 9 === Setting up hostname === … … 20 20 * Change '''pc''' to '''idp''' 21 21 * 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 idp22 - 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 23 23 24 24 === IP Set up === … … 86 86 87 87 - 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) 89 89 - Organization name: '''Example Inc''' (This will simply be added to the base entry as the name of your institute) 90 90 - Administrator password: '''[whatever you'd like]''' … … 153 153 {{{ 154 154 organization = "Name of your institution" 155 cn = idp.'your domain'.ws. ac.lk155 cn = idp.'your domain'.ws.learn.ac.lk 156 156 tls_www_server 157 157 encryption_key … … 329 329 }}} 330 330 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:331 Now, 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: 332 332 333 333 {{{ … … 346 346 TLS required success 347 347 {{{ 348 dn: dc='your domain'dc=ws,dc= ac,dc=lk349 dn: cn=admin,dc='your domain'dc=ws,dc= ac,dc=lk348 dn: dc='your domain'dc=ws,dc=learn,dc=ac,dc=lk 349 dn: cn=admin,dc='your domain'dc=ws,dc=learn,dc=ac,dc=lk 350 350 }}} 351 351 … … 358 358 Open 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. 359 359 {{{ 360 # group, 'your domain'.ws. ac.lk361 dn: ou=group,dc='your domain'dc=ws,dc= ac,dc=lk360 # group, 'your domain'.ws.learn.ac.lk 361 dn: ou=group,dc='your domain'dc=ws,dc=learn,dc=ac,dc=lk 362 362 description: learn groups 363 363 objectClass: top 364 364 objectClass: organizationalUnit 365 365 ou: group 366 # adm staf, group, 'your domain'.ws. ac.lk367 dn: cn=adm,ou=group,dc='your domain'dc=ws,dc= ac,dc=lk366 # adm staf, group, 'your domain'.ws.learn.ac.lk 367 dn: cn=adm,ou=group,dc='your domain'dc=ws,dc=learn,dc=ac,dc=lk 368 368 cn: adm 369 369 description: System Admin Staff … … 372 372 objectClass: top 373 373 374 # acadamic staf, group, 'your domain'.ws. ac.lk375 dn: cn=acd,ou=group,dc='your domain'dc=ws,dc= ac,dc=lk374 # acadamic staf, group, 'your domain'.ws.learn.ac.lk 375 dn: cn=acd,ou=group,dc='your domain'dc=ws,dc=learn,dc=ac,dc=lk 376 376 cn: acd 377 377 description: Acadamic Staff … … 380 380 objectClass: top 381 381 382 # students, group, 'your domain'.ws. ac.lk383 dn: cn=std,ou=group,dc='your domain'dc=ws,dc= ac,dc=lk382 # students, group, 'your domain'.ws.learn.ac.lk 383 dn: cn=std,ou=group,dc='your domain'dc=ws,dc=learn,dc=ac,dc=lk 384 384 cn: std 385 385 description: Students … … 388 388 objectClass: top 389 389 390 # servers, 'your domain'.ws. ac.lk391 dn: ou=servers,dc='your domain'dc=ws,dc= ac,dc=lk390 # servers, 'your domain'.ws.learn.ac.lk 391 dn: ou=servers,dc='your domain'dc=ws,dc=learn,dc=ac,dc=lk 392 392 description: servers 393 393 objectClass: top … … 395 395 ou: servers 396 396 397 # idp, servers, 'your domain'.ws. ac.lk398 dn: cn=idp,ou=servers,dc='your domain'dc=ws,dc= ac,dc=lk397 # idp, servers, 'your domain'.ws.learn.ac.lk 398 dn: cn=idp,ou=servers,dc='your domain'dc=ws,dc=learn,dc=ac,dc=lk 399 399 cn: idp 400 400 description: Identity Server … … 406 406 userPassword: {crypt}idpldap 407 407 408 # www, servers, 'your domain'.ws. ac.lk409 dn: cn=www,ou=servers,dc='your domain'dc=ws,dc= ac,dc=lk408 # www, servers, 'your domain'.ws.learn.ac.lk 409 dn: cn=www,ou=servers,dc='your domain'dc=ws,dc=learn,dc=ac,dc=lk 410 410 cn: irs 411 411 description: IRS Server … … 417 417 userPassword: {crypt}wwwsvr 418 418 419 # people, 'your domain'.ws. ac.lk420 dn: ou=people,dc='your domain'dc=ws,dc= ac,dc=lk419 # people, 'your domain'.ws.learnac.lk 420 dn: ou=people,dc='your domain'dc=ws,dc=learn,dc=ac,dc=lk 421 421 description: inst users 422 422 objectClass: top … … 424 424 ou: people 425 425 426 # testme, people, 'your domain'.ws. ac.lk427 dn: uid=testme,ou=people,dc='your domain'dc=ws,dc= ac,dc=lk426 # testme, people, 'your domain'.ws.learn.ac.lk 427 dn: uid=testme,ou=people,dc='your domain'dc=ws,dc=learn,dc=ac,dc=lk 428 428 cn: Test Me 429 429 departmentNumber: LEARN … … 467 467 468 468 {{{ 469 ldapadd -H ldap:// -x -D "cn=admin,dc='your domain'dc=ws,dc= ac,dc=lk" -W -Z -f initial.ldif469 ldapadd -H ldap:// -x -D "cn=admin,dc='your domain'dc=ws,dc=learn,dc=ac,dc=lk" -W -Z -f initial.ldif 470 470 }}} 471 471 … … 473 473 474 474 {{{ 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"475 ldapsearch -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" 476 476 }}} 477 477 Note that Clear-Text userPassword enconded in '''base64''' … … 480 480 481 481 {{{ 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 -W482 ldapdelete -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 483 483 }}} 484 484 … … 494 494 changetype: modify 495 495 replace: 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 * none496 olcAccess: {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 497 497 olcAccess: {1}to attrs=shadowLastChange by self write by * read 498 498 olcAccess: {2}to * by * read … … 521 521 {{{ 522 522 $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'); 525 525 $config->custom->appearance['hide_template_warning'] = true; 526 526 $servers->setValue('server','tls',true); … … 571 571 {{{ 572 572 <VirtualHost *:80/> 573 ServerAdmin webmaster@'your domain'.ws. ac.lk573 ServerAdmin webmaster@'your domain'.ws.learn.ac.lk 574 574 DocumentRoot /var/www/html 575 ServerName idp.'your domain'.ws. ac.lk576 Redirect permanent /phpldapadmin https://'your domain'.ws. ac.lk/phpldapadmin575 ServerName idp.'your domain'.ws.learn.ac.lk 576 Redirect permanent /phpldapadmin https://'your domain'.ws.learn.ac.lk/phpldapadmin 577 577 ErrorLog ${APACHE_LOG_DIR}/error.log 578 578 CustomLog ${APACHE_LOG_DIR}/access.log combined … … 601 601 602 602 {{{ 603 ServerAdmin webmaster@'your domain'.ws. ac.lk604 ServerName idp.'your domain'.ws. ac.lk603 ServerAdmin webmaster@'your domain'.ws.learn.ac.lk 604 ServerName idp.'your domain'.ws.learn.ac.lk 605 605 }}} 606 606 Next, 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: