ypcat(1) ypcat(1)
NAME
ypcat - display the contents of a specific NIS file
SYNOPSIS
ypcat [-k] [-d domain] mapname Format 1
ypcat -x Format 2
DESCRIPTION
This command enables you to obtain information on the contents of a
specific NIS file.
The ypcat command uses the Network Information Service functions. The
ypserv daemon must be active on at least one NIS server, and the
ypbind daemon must be active on the local host.
The ypcat command asks the ypbind daemon on the local host for the
Internet address and the port number of the appropriate ypserv daemon.
The ypcat command subsequently fetches the data from this ypserv.
The NIS files are generated by the network administrator, and the up-
to-date version of the files transferred to the slaves. These files
exist on the NIS master in two formats:
- ASCII format
- dbm format (dbm = database management).
The command ypcat accesses the NIS files in dmb format. If the network
administrator is using the menu system, modifications are made
directly in the dbm version of the files. Then the ASCII versions are
updated.
If the network administrator is not using the menu system, he or she
must create the ASCII files himself/herself and then generate the
files in dbm format [see makedbm(1M)]. If used correctly, the informa-
tion in the NIS files in both ASCII and dbm formats is consistent.
On the slaves, the NIS files only exist in dbm format.
OPTIONS
-k means that the keys according to which the NIS files are organ-
ized are also output. This is useful if the keys are not part of
the entry. This is the case, for example, for the NIS files net-
group and mail.aliases
-d domain
must be specified if you want to output a NIS file from a domain
other than the default domain. domain is the name of the domain
that the NIS file manages.
Page 1 Reliant UNIX 5.44 Printed 11/98
ypcat(1) ypcat(1)
If this argument is omitted, the name used is the name output
when the domainname(1M) command is issued.
mapname
Name of the NIS file whose contents are to be output.
-x A table for converting aliases to long names is output in the NIS
files.
The following are the standard Network Information Service files:
________________________________________________________________________
| File name | Contents | Key |
|____________________|__________________|_______________________________|
| group.bygid | Global | GID |
| group.byname | user groups | group names |
|____________________|__________________|_______________________________|
| hosts.byaddr | Accessible | Internet addresses |
| hosts.byname | hosts | Host names |
|____________________|__________________|_______________________________|
| mail.aliases | Global | Names of mailing lists |
| | mailing list | or mail users |
|____________________|__________________|_______________________________|
| netgroup.byhost | Network groups | Host names |
| netgroup.byuser | | User names |
| netgroup | | Names of network groups |
|____________________|__________________|_______________________________|
| networks.byaddr | Accessible | Network addresses |
| networks.byname | networks | Name of networks |
|____________________|__________________|_______________________________|
| passwd.byname | Global | User names |
| passwd.byuid | user names | UIDs |
|____________________|__________________|_______________________________|
| publickey.byname | Public keys | Names of public keys |
|____________________|__________________|_______________________________|
| protocols.byname | Protocols used | Protocol names |
| protocols.bynumber | | Protocol numbers |
|____________________|__________________|_______________________________|
| rpc.byname | RPC daemons | Daemon names |
| rpc.bynumber | | Program numbers |
|____________________|__________________|_______________________________|
| services.byname | Internet | Service names |
| services.byport | services | Port numbers of the services |
|____________________|__________________|_______________________________|
| timed | Master and | Host names |
| | slaves for | |
| | synchronization | |
|____________________|__________________|_______________________________|
| ypservers | Names of NIS | Host names |
| | servers | |
|____________________|__________________|_______________________________|
Page 2 Reliant UNIX 5.44 Printed 11/98
ypcat(1) ypcat(1)
The NIS files are described in detail in the Network Administration -
System Administrator Guide.
EXAMPLES
1) You would like information about the contents of the NIS file
passwd.byname.
Input:
ypcat passwd.byname
Output:
barbara::3337:4446:,,,,:/usr/barbara:/bin/sh
mensch::3334:4446:,,,,:/usr/mensch:/bin/sh
mona::3335:4446:,,,,:/usr/mona:/bin/sh
The contents of the NIS file with the global user names in the
current domain are output.
2) You would like information about the contents of the NIS file
passwd.byname in the domain sp4.
Input:
ypcat -d sp4 passwd.byname
Output:
karen:x:2056:10:hollo,,99999:/home/kevin:/bin/csh
john:x:2077:10:holla,,999999:/usr/guest/neu:
els:x:2074:10:hollo,,9999999:/usr/u1/shm: daemon:*:1:1::/:
The contents of the NIS file with the global user names in the
domain sp4 are output.
SEE ALSO
domainname(1), ypmatch(1), ypserv(1M).
Page 3 Reliant UNIX 5.44 Printed 11/98