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.

2. Change to the <strong>NIS</strong> domain directory.# cd /var/yp/domainname3. Disassemble the ypservers file.# makedbm -u ypservers >/tmp/temp_fileThe makedbm comm<strong>and</strong> converts ypservers from ndbm format to a temporaryASCII file /tmp/temp_file.4. Edit the /tmp/temp_file file using a text editor. Add the name of the newslave server to the list of servers. Then save <strong>and</strong> close the file.5. Run the makedbm comm<strong>and</strong> with temp_file as the input file <strong>and</strong> ypserversas the output file.# makedbm /tmp/temp_file ypserversmakedbm then converts ypservers back into ndbm format.6. Verify that the ypservers map is correct (since there is no ASCII file forypservers) by typing the following on the slave.slave3# makedbm -u ypserversThe makedbm comm<strong>and</strong> displays each entry in ypservers on your screen.Note – If a machine name is not in ypservers, it will not receive updates to themap files because yppush consults this map for the list of slave servers.7. On the new <strong>NIS</strong> slave, 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>.8. Set up the new slave server’s <strong>NIS</strong> domain directory.Copy the <strong>NIS</strong> map set from the master server, then start the <strong>NIS</strong> client. Whenrunning the ypinit comm<strong>and</strong>, follow the prompts <strong>and</strong> list the <strong>NIS</strong> servers inorder of preference.slave3# cd /var/ypslave3# ypinit -cslave3# svcadm enable network/nis/client9. Initialize this machine as a slave.slave3# /usr/sbin/ypinit -s ypmasterwhere ypmaster is the machine name of the existing <strong>NIS</strong> master server.10. Stop the machine running as an <strong>NIS</strong> client.# svcadm disable network/nis/clientChapter 6 • Administering <strong>NIS</strong> (Tasks) 109

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

Saved successfully!

Ooh no, something went wrong!