Difference between revisions of "NAD810 0901 Lab 3"

From CDOT Wiki
Jump to: navigation, search
(Preparation)
Line 3: Line 3:
  
 
=Preparation=
 
=Preparation=
* Read the [[http://cs.senecac.on.ca/~rchan/nad810/0901/nis-server.pdf Server] and  
+
* Read the [[http://cs.senecac.on.ca/~rchan/nad810/0901/nis-server.pdf Server] and [http://cs.senecac.on.ca/~rchan/nad810/0901/nis-client.pdf Client] Slides
[http://cs.senecac.on.ca/~rchan/nad810/0901/nis-client.pdf Client] Slides
 
 
* Check/install the following rpm packages:
 
* Check/install the following rpm packages:
 
** ypbind  
 
** ypbind  

Revision as of 10:30, 3 February 2009

Objective

Centralize Local Area Network User accounts Using NIS and NFS

Preparation

  • Read the [Server and Client Slides
  • Check/install the following rpm packages:
    • ypbind
    • ypserv
    • yp-tools
  • Locate/Configure a small physical or virtaul LAN with at least 3 nodes in the LAN

Setup the NIS Server

  • Backup the configuration /var/yp/Makefile to /var/yp/Makefile.org
  • Modify the Makefile to support:
    • Minimum UID 5000
    • Minimum GID 5000
    • Enable slave servers
    • Merge user password and group password
    • map files for passwd, group, hosts, rpc, and services
  • Set the NIS domain name (use learnid.nad810.org)
  • Start the NIS server
  • Initialize the map files

Setup the NIS client on the NIS server

  • Edit the file /etc/yp.conf
  • Add the following line:
ypserver localhost
  • Start the NIS Client daemon ypbind
service ypbind start

Testing the NIS system

  • use the ypcat and other yp tools from the yp-tools package
  • Create a new user on the NIS server
useradd -m new-user-id
passwd new-user-id
  • Update the map files
cd /var/yp
make
  • use the ypcat and other yp tools to check for the new user account information

Setup the NIS client on other Linux Box on the LAN

  • Set the NIS domain name to match the one on the NIS server (case sensitive)
  • Edit the file /etc/yp.conf
  • Add the following line:
domain [NISDOMMAIN] server [HOSTNAME]
  • Start the NIS client daemon ypbind

Testing the NIS system on other Linux Box on the LAN

  • Make sure that the ports used by NIS are opened on the firewalls: on NIS server and NIS client
  • run the ypcat test
  • Edit the /etc/nsswitch.conf file to include NIS authentication
  • Try to login with the new user account create above - missing user home directory on the Linux Box!

Setup home directory for Network Users

  • Enable NFS on the NIS server to export network users' home directory
  • Configure NFS mount on all the systems that users will use to login to the NIS domain

Completing the Lab

Document all the steps into a report and submit to your instructor by Feb 10, 2009