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.

Obtaining Map InformationUsers can obtain information from <strong>and</strong> about the maps at any time by using theypcat, ypwhich, <strong>and</strong> ypmatch comm<strong>and</strong>s. In the examples that follow, mapnamerefers both to the official name of a map <strong>and</strong> to its nickname, if any.To list all the values in a map, type the following.% ypcat mapnameTo list both the keys <strong>and</strong> the values (if any) in a map, type the following.% ypcat -k mapnameTo list all the map nicknames, type any of the following comm<strong>and</strong>s.% ypcat -x% ypmatch -x% ypwhich -xTo list all the available maps <strong>and</strong> their master(s), type the following.% ypwhich -mTo list the master server for a particular map, type the following.% ypwhich -m mapnameTo match a key with an entry in a map, type the following.% ypmatch key mapnameIf the item you are looking for is not a key in a map, type the following.% ypcat mapname | grep itemwhere item is the information for which you are searching. To obtain informationabout other domains, use the -d domainname options of these comm<strong>and</strong>s.If the machine requesting information for a domain other than its default does nothave a binding for the requested domain, ypbindconsults the/var/yp/binding/domainname/ypservers file for a list of servers for that domain.If this file does not exist it issues an RPC broadcast for a server. In this case, there mustbe a server for the requested domain on the same subnet as the requesting machine.Changing a Map’s Master ServerTo change the master server for a selected map, you first have to build the map on thenew <strong>NIS</strong> master. Since the old master server name occurs as a key-value pair in theexisting map (this pair is inserted automatically by makedbm), copying the map to thenew master or transferring a copy to the new master with ypxfr is insufficient. Youhave to reassociate the key with the new master server name. If the map has an ASCIIsource file, you should copy this file to the new master.98 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!