


YPFILES(5)                FILE FORMATS                 YPFILES(5)



NAME
     ypfiles - NIS database and directory structure

DESCRIPTION
     The Network Information Service (NIS)  uses  a  distributed,
     replicated  database  of  dbm files contained in the /var/yp
     directory hierarchy on each NIS server.  A dbm database con-
     sists  of two files, created by calls to the ndbm(3) library
     package.  One has the filename extension .pag and the  other
     has the filename extension .dir.  For instance, the database
     named hosts.byname, is implemented  by  the  pair  of  files
     hosts.byname.pag and hosts.byname.dir.

     A dbm database served by the NIS service is  called  an  NIS
     _m_a_p.   An NIS _d_o_m_a_i_n is a subdirectory of /var/yp containing
     a set of NIS maps.  Any number of  NIS  domains  can  exist.
     Each may contain any number of maps.

     No maps are required  by  the  NIS  lookup  service  itself,
     although  they  may  be required for the normal operation of
     other parts of the system.  There is no list of  maps  which
     the  NIS  service  serves  -  if  the  map exists in a given
     domain, and a client asks about it,  the  NIS  service  will
     serve  it.  For a map to be accessible consistently, it must
     exist on all NIS servers that serve the domain.  To  provide
     data  consistency  between the replicated maps, an  entry to
     run ypxfr periodically should be made  in  the  super-user's
     crontab file on each server.  More information on this topic
     is in ypxfr(8).

     The NIS maps  should  contain  two  distinguished  key-value
     pairs.   The  first is the key YP_LAST_MODIFIED, having as a
     value a ten-character ASCII order number.  The order  number
     should be the system time in seconds when the map was built.
     The second key is YP_MASTER_NAME, with the name of  the  NIS
     master  server  as  a value.  makedbm(8) generates both key-
     value pairs automatically.  A map that does not contain both
     key-value  pairs  can  be served by the NIS service, but the
     ypserv process will not be able to return  values  for  "Get
     order number" or "Get master name" requests.  See ypserv(8).
     In addition, values of these two keys are used by ypxfr when
     it  transfers a map from a master NIS server to a slave.  If
     ypxfr cannot figure out where to get the map, or  if  it  is
     unable  to  determine  whether the local copy is more recent
     than the copy at the master, you must set extra command line
     switches when you run it.

     The NIS maps must be generated and modified only at the mas-
     ter server.  They are copied to the slaves using ypxfr(8) to
     avoid potential byte-ordering problems among the NIS servers
     running  on  machines  with  different architectures, and to
     minimize the amount of  disk  space  required  for  the  dbm



Sun Release 4.1   Last change: 14 December 1987                 1






YPFILES(5)                FILE FORMATS                 YPFILES(5)



     files.   The  NIS  database can be initially set up for both
     masters and slaves by using ypinit(8).

     After the server databases are set up, it is  probable  that
     the  contents  of  some  maps will change.  In general, some
     ASCII source version of the database exists on  the  master,
     and  it  is changed with a standard text editor.  The update
     is incorporated into the NIS map and is propagated from  the
     master  to the slaves by running /var/yp/Makefile.  All Sun-
     supplied maps have entries in /var/yp/Makefile; if  you  add
     an  NIS  map,  edit  this  file to support the new map.  The
     makefile uses makedbm(8) to generate the NIS map on the mas-
     ter,  and  yppush(8)  to  propagate  the  changed map to the
     slaves.  yppush is a client  of  the  map  ypservers,  which
     lists  all  the  NIS  servers.  For more information on this
     topic, see yppush(8).

FILES
     /var/yp
     /var/yp/Makefile

SEE ALSO
     dbm(3X),  makedbm(8),  rpcinfo(8C),  ypinit(8),   ypmake(8),
     yppoll(8), yppush(8), ypserv(8), ypxfr(8)

NOTES
     The Network Information Service (NIS) was formerly known  as
     Sun  Yellow Pages (YP). The functionality of the two remains
     the same; only the name has changed.  The name Yellow  Pages
     is  a  registered trademark in the United Kingdom of British
     Telecommunications plc, and may not be used without  permis-
     sion.























Sun Release 4.1   Last change: 14 December 1987                 2



