Changes

Jump to: navigation, search

OPS335-Lab-ldap

379 bytes added, 10:23, 12 April 2021
m
INVESTIGATION 1: Connecting a Client Machine to an LDAP server
You won't be asked to set up an OpenLDAP server from scratch, we don't have time for that. So you can start with a VM I made for you.
Download [https://scs.senecacollege.ca/~andrew.smith/ops335/vm4.qcow2.gz the disk image here] , extract it into '''images''' directory and set it up the same way you've set up the midterm test review.by "Importing existing disk image":
* You only need 512MB of RAM.
* Connect it to your ops335 network.
* You may find it helpful to add a record for vm4 in your DNS, and set up ssh-keys login to vm4.
The '''root ''' password is '''seneca99'''.
OpenLDAP has been set up on it using [https://www.itzgeek.com/how-tos/linux/centos-how-tos/step-step-openldap-server-configuration-centos-7-rhel-7.html this itzgeek guide]. You should read that guide even though you don't need to perform all those steps yourself.
</source>
*Use the '''ldapadd''' command to enter this new information into the database (see the Itzgeek [https://www.itzgeek.com/how-tos/linux/centos-how-tos/step-step-openldap-server-configuration-centos-7-rhel-7.html/2 tutorial] for an example). As before use Use simple authentication, the distinguished name of the ldap administrator, and get prompted for a password.
* Use '''ldapsearch''' to confirm that the new users have been added to the database. You should get output similar to the following:
<source>
*Most updates will be run with specially formatted ldif files. These use the same structure as the files you created to add users, but will be shorter as they will only be changing one attribute.
*Each entry in an ldif file identifies an object to work with, and a changetype (which is an action to take on that object). Depending on the changetype, there might be an extra line for information to be changed or added.
*Write an ldif file called '''update1.ldif''' that will '''add''' the attribute '''roomNumber ''' to the user with your username. Set the value of roomNumber to be the room your class takes place in(or any room number if you are taking the course online).*Use '''ldapmodify''' to apply this file to your database, then run a search '''ldapsearch''' to confirm the new entry has been added.
*Write a new ldif file called '''update2.ldif''' that will '''replace''' the '''mail''' address of the user with your username so that it has your actual Seneca email address. Use '''ldapmodify''' again to apply this change to the database.
*Write a third ldif file called '''update3.ldif''' to '''delete''' the user '''john ''' from the database, then apply that change using '''ldapmodify''' again.
*Use '''ldapsearch''' to confirm that these changes have taken place.
*Note that it is possible to write ldif files to make multiple changes at once, but that is beyond this course.
 
'''Record steps, commands, and your observations in all INVESTIGATIONS here in your OPS335 lab log-book'''
 
{{Admon/important |Backup your VMs!|You MUST perform a '''full backup''' of ALL of your VMs whenever you complete your '''OPS335 labs''' or when working on your '''OPS335 assignments'''. You should be using the dump or rsync command, and you should use the Bash shell script that you were advised to create in order to backup all of your VMs.}}
== COMPLETING THE LAB ==
You have now learned how to connect a client machine to an existing LDAP server for centralized authentication, as well as how to update the information held in that server.
'''Depending on your professor you will either be asked to submit the lab in class, or online. Follow the appropriate set of instructions below''' ===Online Submission (Ahad Mammadov's sections only)=== Follow the instructions for lab 7 on blackboard.
Follow the instructions for lab 8 on blackboard.
<!--
===Andrew's sections===
::<span style="color:green;font-size:1.5em;">&#x2713;</span>vm1/2/3 can authenticate against the LDAP database in vm4.
::<span style="color:green;font-size:1.5em;">&#x2713;</span>Three users created in LDAP.
-->
== EXPLORATION QUESTIONS ==
572
edits

Navigation menu