NIS on Linux
gmake: Leaving directory '/var/yp/goofy.disney.com'
If anywhere in between the output, if there is a message like this
Make:***No rule to make target /etc/shadow
Make: Leaving directory /var/yp/goofy.disney.com
Then one of the files listed in the Makefile are missing.
To start NIS automatically at boot time, type the following at prompt:
[root@goofy /root]# /etc/rc.d/rc3.d
[root@goofy /root]# ln -s ../init.d/ypserv ypserv
This creates a symbolic link from the runlevel 3 startup directory. Now, we have a NIS master server running.
We now need a NIS client to work with. We can run the NIS client on the same machine running the NIS server
First of all, create the /etc/yp.conf file. This file has only two lines, which are as follows:
domainname is the name of our NIS domain and nis_server is the server's hostname.
Our file looked like this:
The next file to edit is /etc/sysconfig/network file to set the NIS domainname at boot time which was discussed above.
The last file to edit is /etc/nsswitch.conf file.
# An example Name Service Switch config file. This file should
# be sorted with the
# most-used services at the beginning.
# The entry '[NOTFOUND=return]' means that the search for an
# entry should stop if the
# search in the previous entry turned
# up nothing. Note that if the search failed due to some other
# reason (like no NIS
# server responding) then the search
# continues with the next entry.
# Legal entries are:
# nisplus or nis+ Use NIS+ (NIS version 3)
# nis or yp Use NIS (NIS version 2), also called YP
# dns Use DNS (Domain Name Service)
# files Use the local files
# db Use the local database (.db) files
# compat Use NIS on compat mode
# [NOTFOUND=return] Stop searching if not found so far
# To use db, put the "db" in front of "files" for entries you
# want to be looked up
# first in the databases
# passwd: db files nisplus nis