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

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

▼How to Change a Map’s Master Server1. On the new master, become superuser or assume an equivalent role.Roles contain authorizations <strong>and</strong> privileged comm<strong>and</strong>s. For more informationabout roles, see “Using Role-Based Access Control (Tasks)” in System AdministrationGuide: Security <strong>Services</strong>.2. Change directories.newmaster# cd /var/yp3. The Makefile must have an entry for the new map before you specify the mapto make. If this is not the case, edit the Makefile now, using a map calledsites.byname.4. To update or remake the map, type the following.newmaster# make sites.byname5. If the old master remains an <strong>NIS</strong> server, remote log in (rlogin) to the oldmaster <strong>and</strong> edit Makefile. Make sure you comment out the section of theMakefile that made sites.byname so that it is no longer made there.6. If sites.byname only exists as an ndbm file, remake it on the new master bydisassembling a copy from any <strong>NIS</strong> server, then running the disassembledversion through makedbm.newmaster# cd /var/ypnewmaster# ypcat sites.byname | makedbm -domain/sites.bynameAfter making the map on the new master, you must send a copy of the new map tothe other slave servers. Do not use yppush, because the other slaves will try to getnew copies from the old master, rather than the new one. A typical method forcircumventing this is to transfer a copy of the map from the new master back to theold master. To do this, become superuser, or assume an equivalent role, on the oldmaster server <strong>and</strong> type the following.oldmaster# /usr/lib/netsvc/yp/ypxfr -h newmaster sites.bynameNow it is safe to run yppush. Any remaining slave servers still believe that the oldmaster is the current master <strong>and</strong> will attempt to get the current version of the mapfrom the old master. When clients do so, they will get the new map, which namesthe new master as the current master.If this method fails, you can log in as root on each <strong>NIS</strong> server <strong>and</strong> execute theypxfr comm<strong>and</strong> shown above.Modifying Configuration Files<strong>NIS</strong> intelligently parses the setup files. Although this makes <strong>NIS</strong> administration easier,it does make the behavior of <strong>NIS</strong> more sensitive to changes in the setup <strong>and</strong>configuration files.Chapter 6 • Administering <strong>NIS</strong> (Tasks) 99

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

Saved successfully!

Ooh no, something went wrong!