makedbm man page on DigitalUNIX

Man page or keyword search:  
man Server   12896 pages
apropos Keyword Search (all sections)
Output format
DigitalUNIX logo
[printable version]

makedbm(8)							    makedbm(8)

       makedbm - Makes a Network Information Service (NIS) map file

       /var/yp/makedbm	[-i yp_input_file] [-s yp_secure_name] [-a method] [-o
       yp_output_name] [-d yp_domain_name] [-m yp_master_name] infile outfile

       /var/yp/makedbm [-a method] -u  infile

       Specifies that NIS maps are to be stored in one of the  following  for‐
       mats:  btree  --	 Recommended  when creating and maintaining very large
       maps.  dbm/ndbm -- For backward compatibility.  This  is	 the  default.
       hash  -- A potentially quicker method for managing small maps.  Creates
       a special entry with the key YP_INPUT_FILE, which is set to the	speci‐
       fied  value.   Creates a special entry with the key YP_SECURE, which is
       set to the specified value. This causes the makedbm command to write  a
       secure map.  Creates a special entry with the key YP_OUTPUT_NAME, which
       is set to the specified value.  Creates a special entry	with  the  key
       YP_DOMAIN_NAME, which is set to the specified value.  Creates a special
       entry with the key YP_MASTER_NAME, which is set to the specified value.
       If  no master host name is specified, YP_MASTER_NAME will be set to the
       local host name.	 Undoes a dbm file. Prints the file to standard output
       in  a  plain text format, one entry per line, with a single space sepa‐
       rating keys from values. This option processes dbm/ndbm-formatted files
       by  default. To undo btree or hash files, you must use the -a option in
       combination with the -u option to specify the format.

       The makedbm command takes the file specified by the argument infile and
       converts it to a single file or a pair of files in dbm(3), btree(3), or
       hash(3) format. The dbm(3) files are stored  as	outfile.pag  and  out‐
       file.dir,  the  btree(3)	 files	are  stored  as outfile.btree, and the
       hash(3) files are stored as outfile.hash. Each line of the  input  file
       is  converted to a single record. All characters up to the first tab or
       space form the key, and the rest of the line is defined	as  the	 key's
       associated data. If a line ends with a backslash (\), the data for that
       record is continued onto the next line. It  is  left  for  the  Network
       Information  Service  (NIS)  clients  to interpret the number sign (#);
       makedbm does not treat it as a comment character.  The infile parameter
       can be a hyphen (-), in which case makedbm reads the standard input.

       The  makedbm  command  is meant to be used in generating database files
       for NIS. The makedbm command generates a special	 entry	with  the  key
       YP_LAST_MODIFIED, which is set to the modification date from infile.

       You  must  use  the  same  database format for each map in a domain. In
       addition, a server serving multiple NIS domains must use the same data‐
       base format for all domains.

       Although	 a  Tru64  UNIX NIS server that takes advantage of btree files
       will be able to store very large maps, NIS slave servers that lack this
       feature	might  have  a much smaller limit on the number of map entries
       they can handle.	 It may not be possible to distribute very large  maps
       from  a	Tru64 UNIX NIS master server to a slave server that lacks sup‐
       port for very large maps.   NIS	clients	 are  not  affected  by	 these

       The  following  example shows how a combination of commands can be used
       to make the NIS dbm files passwd.byname.pag and passwd.byname.dir  from
       the /etc/passwd file: % awk 'BEGIN { FS = ":"; OFS = "\t"; }
	{   print  $1,	$0  }'	/etc/passwd  >	ptmp  %	 /var/yp/makedbm  ptmp
       /var/yp/domain_name/passwd.byname % rm ptmp

	      The awk command creates the ptmp file, which is in a form usable
	      by makedbm. The makedbm command uses this temporary file to cre‐
	      ate the database files, which it stores in the map  file	direc‐
	      tory  for	 your  domain,	/var/yp/domain_name.  The  rm  command
	      removes the ptmp file.  The following example shows how to  cre‐
	      ate  the same passwd.byname map in btree format: /var/yp/makedbm
	      -a b ptmp /var/yp/domain_name/passwd.byname

	      This command  outputs  a	file  called  passwd.byname.btree  and
	      stores   it   in	 the  map  file	 directory  for	 your  domain,
	      /var/yp/domain_name.  The following example shows how to undo  a
	      hash-formatted ypservers map and put the output into a temporary
	      file    for     editing:	   /var/yp/makedbm     -a     h	    -u
	      /var/yp/domain_name/ypservers > tmpfile

	      You  might  undo the ypservers map in this manner if you need to
	      add or remove a slave server from the domain. See Network Admin‐
	      istration:  Services for the full procedure and scripts to auto‐
	      mate this process.

       Commands: yppasswd(1), ypmake(8)

       Functions: btree(3), dbm(3), dbopen(3), hash(3), ndbm(3)

       Network Administration: Services


List of man pages available for DigitalUNIX

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
Vote for polarhome
Free Shell Accounts :: the biggest list on the net