13.07.2015 Views

Naming and Directory Services (DNS, NIS, and LDAP)

Naming and Directory Services (DNS, NIS, and LDAP)

Naming and Directory Services (DNS, NIS, and LDAP)

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

If the map or maps being pushed by the Makefile correspond to a domain otherthan the one returned by the comm<strong>and</strong> domainname on the master, you can makesure that they are pushed to the correct domain by starting make in the ypinitshell script with a proper identification of the variable DOM, as follows:# make DOM=domainname passwordThis pushes the password map to the intended domain, instead of the domain towhich the master belongs.9. To enable <strong>NIS</strong> as the naming service, type the following.# cp /etc/nsswitch.nis /etc/nsswitch.confThis replaces the current switch file with the default <strong>NIS</strong>-oriented switch file. Youcan edit this file as necessary.Master Supporting Multiple <strong>NIS</strong> DomainsNormally, an <strong>NIS</strong> master server supports only one <strong>NIS</strong> domain. However, if you areusing a master server to support multiple domains, you must slightly modify thesteps, as described in “Setting Up the Master Server With ypinit” on page 85, whensetting up the server to serve the additional domains.Run the domainname comm<strong>and</strong> on the server. The domain name returned by thecomm<strong>and</strong> is the server’s default domain. The steps described in “Setting Up theMaster Server With ypinit” on page 85 will work properly for setting up service forthat domain. To configure service for any other domain, you must modify the ypinitshell script as follows.# make DOM=correct-domain passwdcorrect-domain is the name of the other domain that you are setting up service for, <strong>and</strong>passwd is the make target. This comm<strong>and</strong> pushes the passwd map to the intendeddomain, instead of the domain to which the master belongs.Starting <strong>and</strong> Stopping <strong>NIS</strong> Service on theMaster ServerNow that the master maps are created, you can start the <strong>NIS</strong> daemons on the masterserver <strong>and</strong> begin service. When you enable the <strong>NIS</strong> service, ypserv <strong>and</strong> ypbind starton the server. When a client requests information from the server, ypserv is thedaemon that answers information requests from clients after looking them up in the<strong>NIS</strong> maps. The ypserv <strong>and</strong> ypbind daemons are administered as a unit.Chapter 5 • Setting Up <strong>and</strong> Configuring <strong>NIS</strong> Service 87

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!