NIS on Linux
Updating auto.master...
gmake[1]: Leaving directory '/var/yp/goofy.disney.com'
If anywhere in between the output, if there is a message like this
Make[1]:***No rule to make target /etc/shadow
Stop.
Make[1]: 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:
domain domainname
server nis_server
domainname is the name of our NIS domain and nis_server is the server's hostname.
Our file looked like this:
domain goofy.disney.com
server goofy.disney.com
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.
# /etc/nsswitch.conf
# 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
Example:
# passwd: db files nisplus nis
- « first
- ‹ previous
- of 11
- next ›
- last »