"Can't enumerate maps from <master_server>. Please check that it is
running."
...generated when running...
/usr/lib/yp/ypinit -s <master_server>
...to configure a Red Hat NIS slave server.
I resolved the problem by pulling together a couple of separate suggestions.
The essence of the problem is that the /usr/lib/yp/ypinit script does not
have a good reputation! Two consecutive lines were originally as follows:
# maps=`ypwhich -m | egrep $MASTER$| awk '{ printf("%s ",$1) }' -`
maps=`$YPBINDIR/yphelper --maps $MASTER`
Changing them as follows allows you to run the /usr/lib/yp/ypinit -s
<master_server> command successfully, with the map files being copied into
/var/yp/<domain>:
maps=`ypwhich -m | egrep $MASTER| awk '{ printf("%s ",$1) }' -`
# maps=`$YPBINDIR/yphelper --maps $MASTER`
The specific changes are:
- use the 'ypwhich' line instead of the 'yphelper' line.
- remove the extraneous '$' after 'MASTER'.
Hope this is of help to someone! It took me long enough to sort it out.