makedbm Command

Purpose

Makes a Network Information Services (NIS) database map.

Syntax

To Create an Map

/usr/sbin/makedbm [  -b ] [  -i NISInputFile ] [ -o NISOutputFile ] [  -d NISDomainName ] [  -m NISMasterName ] InputFile OutputFile

To Create a Non-dbm Formatted Map

/usr/sbin/makedbm [ -u dbmFileName ]

Description

The makedbm command makes an NIS map. It does this by converting the file named in the InputFile parameter into two output files: OutputFile.pag and OutputFile.dir. Each line in each input file is converted into a single Data Base Manager (DBM) record.

The makedbm command is most often invoked from the /var/yp/Makefile file to generate NIS maps. All characters leading up to the first space or tab in each line of the /var/yp/Makefile file form the key. The rest of the line contains value data. If a line ends with a \ (backslash), data for that record is continued on the next line. NIS clients must interpret the # (pound sign) symbol since the makedbm command does not treat it as a comment character. If the InputFile parameter is a - (minus sign), the makedbm command reads standard input instead.

This command generates a special entry in the output map by using the YP_LAST_MODIFIED key, which is the date that the file specified by the InputFile parameter was created (or the current time, if the InputFile parameter is a - (minus sign)).

Flags

Item Description
-b Propagates a map to all servers using the named name server.
-i Creates a special entry with the YP_INPUT_FILE key.
-o Creates a special entry with the YP_OUTPUT_FILE key.
-d Creates a special entry with the YP_DOMAIN_NAME key.
-m Creates a special entry with the YP_MASTER_NAME key.
-u Undoes a DBM file. That is, prints out a DBM file one entry per line, with a single space separating keys from values.

Files

Item Description
/var/yp/Makefile Contains rules for making NIS maps.