NIS Maps

NIS maps are databases that specify certain system information such as user names, passwords, and host names, in a database format called DBM (Database Management).

Each map is constructed from a standard text file by associating an index key with a value. For example, the information in the master server's /etc/hosts file is used to create a map that uses each host name as a key, and the IP address as the value. The key and value pairs (also known as records) that are created from the entries in the/etc/hosts file comprise the hosts.byname map.

Attention: An NIS record has a maximum size of 1024 bytes. This limitation applies to all NIS map files. For example, a list of users in a group can contain a maximum of 1024 characters in single-byte character set file format. NIS cannot operate correctly with map files that exceed this maximum

The most commonly used maps have nicknames that some commands can translate into map names. For instance, when you enter:

ypcat hosts

The output you receive is actually the contents of the hosts.byname map, because there is no map called hosts in the NIS database. (The ypcat -x command produces a list of available nicknames.)

By default, the maps listed in the following table are created if their corresponding files are available on the master server:

Map Nickname File
passwd.byname passwd /etc/passwd
passwd.byuid
group.byname group /etc/group
group.bygid
hosts.byaddr hosts /etc/hosts
hosts.byname
ethers.byaddr ethers /etc/ethers
ethers.byname
networks.byaddr networks /etc/networks
networks.byname
rpc.bynumber /etc/rpc
services.byname services /etc/services
protocols.byname protocols /etc/protocols
protocols.bynumber
netgroup /etc/netgroup
netgroup.byhost
netgroup.byuser
bootparams /etc/bootparams
mail.aliases aliases /etc/aliases
mail.byaddr
publickey.byname /etc/publickey
netid.byname /etc/passwd
/etc/group
/etc/hosts
/etc/netid
netmasks.byaddr /etc/netmasks
ypservers