Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

yppasswd(1)

ypmake(8)

dbm(3)

makedbm(8)  —  Maintenance

NAME

makedbm − Makes a Network Information Service (NIS) dbm file

SYNOPSIS

makedbm [−i yp_input_file] [−s yp_secure_name] [−o yp_output_name] [−d yp_domain_name] [−m yp_master_name] infile outfile

makedbm [−u dbmfilename]

FLAGS

−iCreates a special entry with the key yp_input_file. 

−sCreates a special entry with the key yp_secure_file.  This makes the makedbm command write a secure map.  The key value ypserver looks for YP_SECURE. 

−oCreates a special entry with the key yp_output_name. 

−dCreates a special entry with the key yp_domain_name. 

−mCreates a special entry with the key yp_master_name.  If no master host name is specified, yp_master_name will be set to the local host name. 

−uUndoes a dbm file. That is, prints out a dbm file one entry per line, with a single space separating keys from values. 

DESCRIPTION

The makedbm command takes the file specified by the argument infile and converts it to a pair of files in dbm3 format, namely outfile.pag and outfile.dir.  Each line of the input file is converted to a single dbm 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 dbm files for NIS.  The makedbm command generates a special entry with the key yp_last_modified, which is the date of infile. 

EXAMPLES

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.  The percent sign (%) signifies the system prompt. 

% awk ’BEGIN { FS = ":"; OFS = ""; }
 { print $1, $0 }’ /etc/passwd > ptmp
% makedbm ptmp passwd.byname
% rm ptmp

The awk command creates the file ptmp which is in a form usable by makedbm.  The makedbm command uses the ptmp file to create the NIS dbm files passwd.byname.dir and passwd.byname.pag. The rm command removes the ptmp file. 

RELATED INFORMATION

Commands:  yppasswd(1), ypmake(8)

Functions: dbm(3)

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026