NIS stands for Network Information Service, and is a service that provides information, such as accounts and passwords.
I have set up NIS on my home network to make life a bit easier, especially when using NFS (Networking File System), where information about users and groups are vital for access to the files.
A good book on this subject is Managing NFS and NIS from O'Reilly & Associates, Inc. (http://www.oreilly.com/catalog/nfs2/)
First make sure that you have installed the ypserv and portmap packages.
Now edit the file /var/yp/Makefile. One thing you want to edit
here is what files to create NIS maps from. This is done with
the all directive as seen below. In my case I choose to just
store passwd and group
# If you don't want some of these maps built, feel free to comment
# them out from this list.
all: passwd group
# hosts rpc services netid protocols mail \
# netgrp shadow publickey networks ethers bootparams printcap \
# amd.home auto.master auto.home auto.local passwd.adjunct \
# timezone locale netmasks
Edit the file /var/yp/securenets. In my case it looks like
this
# # securenets This file defines the access rights to your NIS server # for NIS clients. This file contains netmask/network # pairs. A clients IP address needs to match with at least # one of those. # # One can use the word "host" instead of a netmask of # 255.255.255.255. Only IP addresses are allowed in this # file, not hostnames. # # Always allow access for localhost 255.0.0.0 127.0.0.0 # This line gives access to the local network. 255.255.255.0 192.168.0.0
You may also edit the /etc/ypserv.conf file. Take a look at it
and adjust if needed.
In the file /etc/sysconfig/network add
NISDOMAIN=<value>, where <value> is the NIS
domain name. In my case I chose home.rpz as this is my
ordinary domain name for my home network.
Now start portmapper, if not running, and then start ypserv
and yppasswdd. Look in the /var/log/message file for errors
etc.
Check with the command rpcinfo -p if ypserv is running.
Next, generate the NIS maps using the command
/usr/lib/yp/ypinit -m
You now have a running NIS server!
Remember to update the NIS maps each time a source file is
updated, in my case passwd or group. This is done by running
make in the /var/yp directory.
To be written...