Changes

Jump to: navigation, search

OPS335 Lab 7 2018

297 bytes added, 01:10, 1 April 2019
INVESTIGATION 2: CLIENT CONFIGURATION
== OBJECTIVE & PREPARATION==
* Add a new user to your '''host''' with the same name as the one you created on '''vm3''' in lab 4b, but use a different password.
* Download and run the [http://matrix.senecac.on.ca/~peter.callaghan/files/OPS335/nfs.bash nfs.bash] script on each of your machines. This will make your '''host''' an nfs server sharing the home directories held there with the vms. It will also make the vms automatically try to mount the home directories held on '''host''' into their own filesystem as soon as they boot. reboot the VMs now and make sure this is working before continuing.
* An NIS server is used to synchronize system files and other information between machines in an NIS domain.
yum install ypserv ypbind
*Add the following line to the bottom of the file /etc/sysconfig/network
NISDOMAIN="<learnseneca-id>.orgops"
YPSERV_ARGS="-p 783"
*This should be enough to set the domain name, however there is currently a [https://www.centos.org/forums/viewtopic.php?t=47013 bug] in systemd that prevents this from working properly on its own.
**You will also need to start and enable the rhel-domainname service.
*Edit the file /etc/yp.conf and set up your domain:
domain <learnseneca-id>.org ops server 127.0.0.1
*Create the file /var/yp/securenets:
host 127.0.0.1
*The machine will essentially be communicating with its own NIS server when using the Makefile
*Now change to directory /var/yp and run this command to build the information databases
make('''NOTE: '''If you receive a "Domain name cannot be (none)" message, restart ''rhel-domainname'' and try again.)
*Enable and start the NIS binding (ypbind) service.
systemctl start ypbind.service
*Use the following command to verify your NIS server is working - you should see your learnid the password recordfor your own user account.
ypcat passwd
*Add a new user to your '''host''' with the same name as the one you created on '''vm3''' in lab 4b, but use a different password.
*Run 'ypcat passwd' again.
*Note that the new user does not appear. In order for the new user to show up you will need to recreate the map files- change directory to /var/yp and run the "make" command again.
 
== INVESTIGATION 2: CLIENT CONFIGURATION ==
*Log into both '''vm3''' as the new user. Note how they require different passwords on different machines.
*Log out, and log back in as '''root''' (or use your normal user and '''su''') to continue.
*Install ypbind on your vm3.
tail -f /var/log/messages
*Edit /etc/yp.conf adding the following line:
domain <learnidsenecaid>.org ops server 192.168.x.1
*Start the ypbind server with the command.
systemctl start ypbind.service('''NOTE: ''' If you receive an error about rpcbind, ensure "NM_CONTROLLED=no" is removed from your ifcfg file and restart that interface.)
*Looking at your logs ensure that ypbind is registered with rpcbind, if it is unable your firewall may need to be adjusted.
*Now when you run the following command:
== INVESTIGATION 3: ADDING THE OTHER VMS ==
*When you have successfully made this change on '''vm3''', repeat these steps so that '''vm1''' and '''vm2'['' will also use NIS for user identification from files located on '''host'''.
**Warning: When configuring the location of the NIS server to bind to, use the ip address instead of the hostname. When the machine is booting, you have no guarantee that '''named''' starts before '''ypbind'''.
===Online Submission (Peter Callaghan's Classes only)===
Follow the instructions for lab 7 on moodleblackboard.
===In Class Submission(Murray Saul's Classes only)===::<span style="color:green;font-size:1.5em;">&#x2713;</span>Download the labcheck7.bash checking bash shell script by issuing the command:<br><br>'''wget http://matrix.senecac.on.ca/~peter.callaghan/files/OPS335/labcheck7.bash'''<br><br>set execute permission and run the shell script on your '''c7hosthost''' machine.
::*For '''Peter's classes''', follow his Online Submission instructions in Moodle.
::*For '''Murray's classes''', run command (piping to the '''more''' command) and show output to instructor.

Navigation menu