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.

Modifying Makefile EntriesThe following procedure describes how to add <strong>and</strong> delete databases from theMakefile.▼How to Modify the Makefile to Use Specific Databases1. 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. Modify the line that starts with the word all by adding the name(s) of thedatabase you want to add:all: passwd group hosts ethers networks rpc services protocols \netgroup bootparams aliases netid netmasks \auto_direct auto_home auto_direct.time auto_home.timeThe order of the entries is not relevant, but the blank space at the beginning of thecontinuation lines must be a Tab, not spaces.3. Add the following lines at the end of the Makefile:auto_direct: auto_direct.timeauto_home: auto_home.time4. Add an entry for auto_direct.time in the middle of the file.auto_direct.time: $(DIR)/auto_direct@(while read L; do echo $$L; done < $(DIR)/auto_direct$(CHKPIPE)) | \ (sed -e "/^#/d" -e "s/#.*$$//" -e "/^ *$$/d"$(CHKPIPE)) | \ $(MAKEDBM) - $(YPDBDIR)/$(DOM)/auto_direct;@touch auto_direct.time;@echo "updated auto_direct";@if [ ! $(NOPUSH) ]; then $(YPPUSH) auto_direct; fi@if [ ! $(NOPUSH) ]; then echo "pushed auto_direct"; fiwhere■CHKPIPE makes certain that the operations to the left of the pipe (|) aresuccessfully completed before piping the results to next comm<strong>and</strong>s. If theoperations to the left of the pipe do not successfully complete, the process isterminated with a <strong>NIS</strong> make terminated message.■ NOPUSH prevents the makefile from calling yppush to transfer the new mapto the slave servers. If NOPUSH is not set, the push is done automatically.The while loop at the beginning is designed to eliminate any backslash-extendedlines in the input file. The sed script eliminates comment <strong>and</strong> empty lines.The same procedure should be followed for all other automounter maps, such asauto_home, or any other nondefault maps.102 System Administration Guide: <strong>Naming</strong> <strong>and</strong> <strong>Directory</strong> <strong>Services</strong> (<strong>DNS</strong>, <strong>NIS</strong>, <strong>and</strong> <strong>LDAP</strong>) • January 2005

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

Saved successfully!

Ooh no, something went wrong!