HOWTO: The Computer Classroom July 7, 2001  
 
 

2.1.6 NIS

Network Information Service, or NIS, stores a LAN’s user accounts on one ma-chine and makes them available from any machine on the network. This configuration saves you, the system administrator, a lot of time and headaches in setting up and main-taining user accounts. NIS uses several services that must be configured and run for the server to work. Since we have made the user accounts that we will be using in the LAN and the appropriate services are running, we can begin to configure NIS. First, using Pico, edit the /etc/yp.conf file. Most of the lines in the file will be commented out, with a “#” at the beginning of the line. This tells the server not to read this line when looking at the file. We will want to add one line to the end of the file:

domain english broadcast

Since you are setting up your NIS server, you must set it to broadcast the name of your NIS domain. Here, I chose “english,” but you may use whatever domain name you desire for your classroom. I like to keep it the same as the hostname to avoid confusion.

Next, you need to edit the /etc/sysconfig/network file, and add the following line to the end of the file:

NISDOMAIN=english

While this step will be more critical when configuring the workstations, you should still edit this file on the server as well. Next, issue the following command to begin an interactive session:

/usr/lib/yp/ypinit -m

The computer will prompt you for additional NIS servers. Be sure your current server is listed and enter it if it is not; then hit control-D to continue. Once you hit control-D, the server will show you what you just entered; hit “Y” if your information is correct. After hitting “Y,” the computer will configure your NIS server.

If you ever create additional users or update someone’s password, you must run the /usr/lib/yp/ypinit application again to update the NIS server’s information database. If you forget this process, any new users you create will not be able to login us-ing NIS. Finally, for NIS to work, the processes ypserv and portmap must be running. To check if these services are running, and the should be since we turned them on earlier, issue the following commands:

ps ax | grep ypserv
ps ax | grep portmap

Each should return a line showing that the services are running. If they are not, they must be started. You can start each service by issuing either command respectively:

/etc/rc.d/init.d/ypserv start
/etc/rc.d/init.d/portmap start

Now each service should be running, and your NIS server should be ready to receive client logins.

 
   
 
© 2001 by grlucas.com; all rights reserved