makedbm(1M) makedbm(1M)NAME makedbm - generates a Network Information Service (NIS) dbm file SYNOPSIS makedbm [-d yp-domain-name] [-i yp-input-file] [-m yp-master-name] [-o yp-output-name] infile outfile makedbm [-u dbmfilename] ARGUMENTS -d yp-domain-name Creates a special entry with the key YP_DOMAIN_NAME. -i yp-input-file Creates a special entry with the key YP_INPUT_FILE. infile Specifies the file to be converted. This argument can be a -, in which case standard input is read. -m yp-master-name Creates a special entry with the key YP_MASTER_NAME. If no master hostname is specified, YP_MASTER_NAME will be set to the local hostname. -o yp-output-name Creates a special entry with the key YP_OUTPUT_NAME. outfile Specifies the file into which the output of the conversion is placed. -u dbmfilename Undoes a dbm file. That is, prints out a dbm file one entry per line, with a single space separating keys from values. DESCRIPTION makedbm takes infile and converts it to a pair of files in dbm(3X) 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 the data. If a line ends with \, then the data for that record is continued on to the next line. It is left for NIS clients to interpret #; makedbm does not itself treat it as a comment character. The makedbm command is meant to be used in generating dbm files for NIS, and it generates a special entry with yp-last-modified, which is the date of infile (or the current time, if infile is -). January 1992 1
makedbm(1M) makedbm(1M)EXAMPLES It is easy to write shell scripts to convert standard files such as /etc/passwd to the key value form used by makedbm. For example #!/bin/awk -f BEGIN { FS = ":"; OFS = "\t"; } { print $1, $0 } takes the /etc/passwd file and converts it to a form that can be read by makedbm to make the NIS map passwd.byname. That is, the key is a username, and the value is the remaining line in the /etc/passwd file. FILES /etc/yp/makedbm Executable file SEE ALSO yppasswd(1) in A/UX Command Reference dbm(3X) in A/UX Programmer's Reference 2 January 1992