|
|
When no original ASCII file exists, create the NIS map
from the keyboard on the master NIS server by entering input to
makedbm, as shown here:
cd /var/yp
/usr/sbin/makedbm - home_domain/mymap
key1 value1
key2 value2
key3 value3
...
<Ctrl>D
If later you need to modify a map that is
not based on an existing file, you can use makedbm -u
to disassemble the map and create a temporary ASCII intermediate file.
Enter:
cd /var/yp
/usr/sbin/makedbm -u home_domain/mymap > mymap.temp
The resulting temporary file mymap.temp has one entry per line. You can edit this file as required.
To update the map, you give the
name of the modified temporary file to
makedbm as follows:
/usr/sbin/makedbm mymap.temp home_domain/mymap
rm mymap.temp
When makedbm finishes, propagate the map to the slave servers, as described in ``Propagating an NIS map''.
The preceding paragraphs explained how to use some tools, but in reality, almost everything you have to do can be done by ypinit and /var/yp/Makefile, unless you add non-default maps to the database or change the set of NIS servers after the system is already up and running.
Whether you use the Makefile in /var/yp or some other procedure, the goal is the same: a new pair of well-formed dbm files must end up in the maps directory on the master NIS server.