Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

ypmatch(1yp) [ultrix man page]

ypmatch(1yp)															      ypmatch(1yp)

Name
       ypmatch - print the value of one or more keys from a yp map

Syntax
       ypmatch [-d domain] [-k] [-t] key... mname
       ypmatch -x

Description
       The command prints the values associated with one or more keys from the yellow pages (YP) map (database) specified by a mname, which may be
       either a mapname or a map nickname.

       Multiple keys can be specified.	After the key values and the map name have been specified, searches the map for all of the specified keys.
       The  specified  keys  must be exact values in terms of capitalization and length.  The command does not have a pattern matching capability.
       If cannot match a key, it produces a diagnostic message.

       The default list of mapnames served by YP is as follows:

       Note that the YP server must be running ULTRIX Version 4.2 or higher for the and maps to exist.	Also note that the map	is  accessed  with
       port numbers, not service names.  Use the map to access services by name.  The map remains for compatibility.  See the Examples section for
       sample command lines that illustrate how to access information in each of the maps.

Options
       -d Displays key values for specified domain.

       -k Displays key, followed by a colon (:), before displaying value of the key.  This is useful  if  the  keys  are  not  duplicated  in  the
	  returned values, or if the number of specified keys is so large that the output is confusing.

       -t Inhibits translation of nickname to mapname.	For example,
	  ypmatch -t zippy passwd
	  fails because there is no map named passwd, while
	  ypmatch zippy passwd
	  succeeds because translates it to
	  ypmatch zippy passwd.byname.

       -x Displays map nickname table.	This option tells to list the nicknames (mnames) with their associated mapnames.

Examples
       The following are sample command lines that illustrate how to use the command to access information in each of the maps:

       -------------------------------------------------------------------
       Mapname		       Sample command
       -------------------------------------------------------------------
       passwd.byname	       ypmatch user1 passwd.byname
       passwd.byuid	       ypmatch uid1 passwd.byuid
       group.byname	       ypmatch group1 group.byname
       group.byuid	       ypmatch gid1 group.bygid
       hosts.byname	       ypmatch host1 host.byname
       hosts.byaddr	       ypmatch hostaddr1 hosts.byaddr
       networks.byname	       ypmatch network1 networks.byname
       networks.byaddr	       ypmatch netaddr1 networks.byaddr
       services.byname_proto   ypmatch service1/udp services.byname_proto
       services.byport	       ypmatch servport/tcp service.byport
       services.byname	       ypmatch servport/tcp services.byname
       rpc.bynumber	       ypmatch rpcnum rpc.bynumber
       protocols.byname        ypmatch proto1 protocols.byname
       protocols.bynumber      ypmatch protonum1 protocols.bynumber
       netgroup.byuser	       ypmatch user1 netgroup.byuser
       netgroup.byhost	       ypmatch host1 netgroup.byhost
       mail.alias	       ypmatch mailgroup1 mail.alias
       -------------------------------------------------------------------

See Also
       ypfiles(5yp), ypcat(1yp)
       Guide to the Yellow Pages Service

																      ypmatch(1yp)

Check Out this Related Man Page

ypfiles(4)                                                         File Formats                                                         ypfiles(4)

NAME
ypfiles - Network Information Service Version 2, formerly knows as YP DESCRIPTION
The NIS network information service uses a distributed, replicated database of dbm files , in ASCII form, that are contained in the /var/yp directory hierarchy on each NIS server. A dbm database served by the NIS server is called a NIS map. A NIS domain is a subdirectory of /var/yp that contains a set of NIS maps on each NIS server. Standard nicknames are defined in the file /var/yp/nicknames. These names can be used in place of the full map name in the ypmatch and ypcat commands. Use the command ypwhich -x to display the current set of nicknames. Use the command ypwhich -m to display all the avail- able maps. Each line of the nickname file contains two fields separated by white space. The first field is the nickname, and the second field is the name of the map that it expands to. The nickname cannot contain a ".". NIS to LDAP (N2L) If the /var/yp/NISLDAPmapping configuration file is present, the NIS server operates in NIS to LDAP (N2L) mode. In this mode, NIS maps are stored in a new set of DBM files, prepended by the LDAP_ prefix, at /var/yp/domainename. These files are used as a cache backed by infor- mation from an LDAP server. Additional DBM files are created in the same directory to hold the cache's TTL values. N2L mode enables NIS clients to be supported in an LDAP environment. In N2L mode, the old style DBM files, NIS source files, and the ypmake(1M) utility have to role. They are retained to enable easy conver- sion back to the traditional mode, if required. Converting from N2L to Traditional NIS When NIS is operating in N2L mode, it uses a new set of NIS maps with an LDAP_ prefix, based on the contents of the LDAP DIT. The NIS source files are unused and become out of date. If you wish to convert back to the traditional NIS mode, the N2L configuration file should be deleted. The system will then return to using the standard map files. Optionally, the N2L mode map files, /var/yp/*/LDAP_* can also be deleted. If you want to run the system in traditional mode with information based on the DIT, then the NIS source files must be regenerated based on the N2L maps. To regenerate the NIS source files based on the N2L maps, run ypmap2src(1M). NIS+ NIS+ also provides a NIS service when it runs in YP-compatibility mode. See nis+(1) and rpc.nisd(1M). NIS+, in any mode, cannot be run on the same system as ypserv, whether ypserv is in traditional or N2L mode. FILES
/var/yp Directory containing NIS configuration files. /var/yp/binding Stores the information required to bind the NIS client to the NIS server. /var/yp/binding/ypdomain/ypservers Contains the servers to which the NIS client is allowed to bind. /var/yp/Makefile Builds the NIS ndbm databases. /var/yp/nicknames Nicknames file. /var/yp/securenets Defines the hosts and networks that are granted access to information in the served domain. This file is read at startup time by ypserv and ypxfrd. /var/yp/ypdomain Directory containing ndbm databases. /var/yp/NISLDAPmapping NIS to LDAP configuration file /var/yp/*/LDAP_* NIS to LDAP mode map files SEE ALSO
ldap(1), nis+(1), makedbm(1M), nisaddent(1M), nissetup(1M), rpc.nisd(1M), ypbind(1M), ypinit(1M), ypmake(1M), ypmap2src(1M), ypserv(1M), ypxfrd(1M), ndbm(3C), ypclnt(3NSL) NOTES
The NIS+ server, rpc.nisd, when run in "YP-compatibility mode", can support NIS clients only for the standard NIS maps listed below, pro- vided that it has been set up to serve the corresponding NIS+ tables using nissetup(1M) and nisaddent(1M). The NIS+ server should serve the directory with the same name (case sensitive) as the domainname of the NIS client. NIS+ servers use secure RPC to verify client creden- tials but the NIS clients do not authenticate their requests using secure RPC. Therefore, NIS clients can look up the information stored by the NIS+ server only if the information has "read" access for an unauthenticated client, that is, one with nobody NIS+ credentials. NIS maps NIS+ tables passwd.byname passwd.org_dir passwd.byuid passwd.org_dir group.byname group.org_dir group.bygid group.org_dir publickey.byname cred.org_dir hosts.byaddr hosts.org_dir hosts.byname hosts.org_dir mail.byaddr mail_aliases.org_dir mail.aliases mail_aliases.org_dir services.byname services.org_dir services.byservicename services.org_dir rpc.bynumber rpc.org_dir rpc.byname rpc.org_dir protocols.bynumber protocols.org_dir protocols.byname protocols.org_dir networks.byaddr networks.org_dir networks.byname networks.org_dir netmasks.byaddr netmasks.org_dir ethers.byname ethers.org_dir ethers.byaddr ethers.byname bootparams bootparams auto.master auto_master.org_dir auto.home auto_home.org_dir auto.direct auto_direct.org_dir auto.src auto_src.org_dir SunOS 5.10 24 Nov 2003 ypfiles(4)
Man Page