Open main menu

CDOT Wiki β

Changes

OPS335 NIS Lab

353 bytes added, 11:50, 16 November 2015
Updates for fall 2015
* An NIS server is used to synchronize system files and other information between machines in an NIS domain.
* In this lab you will set a Fedora VM as both an NFS and NIS server. You will then use your other VM's to serve as your NFS and NIS clients.
{{Admon/important|Prerequisites|Before you begin make sure all your machines are up to date (yum dnf update).
Ensure both host and VM's have firewalls set up according to prior labs and all labs have been completed.
Ensure that your NFS server is running on VM2 and exporting the '/home' directory. }}
===PART B: Examining a Problem Solved by NIS===
*Ensure your VM3 is still mounting your home directory from VM 2 using autofs. If it is not, revisit last weeks lab.
*Many of you students have had an issue last week when using in the NFS as you had differing lab caused by having different GID & UID's between systems - when attempting to mount the home directory from the VM2 you received various permission issues. In case you did not experience it, we will intentionally create this issue and then correct it with NIS.*Stop the autofs service on VM3.*Run the following commandon both machines.
grep /home /etc/passwd
*Look at the existing users on VM 3 and compare them with the same users on VM 2. Find one whose credentials differ (Specifically, a user name that exists on both machines, but has a different UID). If you have no such user, create one.
nis-user:x:1001:1001::/home/nis-user:/bin/bash
*While the two hosts share the same users, their UID and GID are different. This will cause a problem when mounting the home directory using NFS.
*Back on vm3 start autofs again and try to switch to your learnid (or other account where UID/GID differs between systems)
su <learnid>
cd ~
*Now when you run the following command:
ypcat passwd
*You should be able to see the 'nis-user' entry users from the host machine, matching its credentialsserver.*If you added a mismatched user, you must update the map files on the hostserver by running make again.
*Edit the /etc/nsswitch.conf file (on VM3 only) and change the following lines so they appear as below:
passwd: nis files
==Completing the Lab==
You have now created an NIS server for your network and caused your other virtual machines to use it as a central repository for user information. It is also allowing all other VMs to mount the /home directory, the instructions for which are also stored in the central information repository.
 
Exploration questions:
#What is the purpose of the rpcinfo command?
932
edits