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.

■Using the Makefile” on page 100.Use the /usr/sbin/makedbm program. makedbm(1M) fully describes thiscomm<strong>and</strong>.Using makedbm to Modify a Non-Default MapThere are two different methods for using makedbm to modify maps if you do nothave an input file:■■Redirect the makedbm -u output to a temporary file, modify the file, then use themodified file as input to makedbm.Have the output of makedbm -u operated on within a pipeline that feeds intomakedbm. This is appropriate if you can update the disassembled map with eitherawk, sed, oracat append.Creating New Maps from Text FilesAssume that a text file /var/yp/mymap.asc was created with an editor or a shellscript on the master. You want to create an <strong>NIS</strong> map from this file <strong>and</strong> locate it in thehomedomain subdirectory. To do this, type the following on the master server.# cd /var/yp# makedbm mymap.asc homedomain/mymapThe mymap map now exists on the master server in the directory homedomain. Todistribute the new map to slave servers run ypxfr.Adding Entries to a File-Based MapAdding entries to mymap is simple. First, you must modify the text file/var/yp/mymap.asc. If you modify the actual dbm files without modifying thecorresponding text file, the modifications are lost. Then run makedbm as shown above.Creating Maps From St<strong>and</strong>ard InputWhen no original text file exists, create the <strong>NIS</strong> map from the keyboard by typinginput to makedbm, as shown below (end with Control-D).ypmaster# cd /var/ypypmaster# makedbm -homedomain/mymapkey1 value1 key2 value2 key3 value3Chapter 6 • Administering <strong>NIS</strong> (Tasks) 107

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

Saved successfully!

Ooh no, something went wrong!