I have not written yet an example of how to setup a NIS Server, it has no magic at all, trust me, but sometime little error could make you loose important amount of time, like this one:

You are happily setting the nis server:
cd /var/yp/
ypinit -m

And then, after answering two questions you get:

updated audit_user
make: Warning: Target `all' not remade because of errors
Current working directory /var/yp
*** Error code 1
The following command caused the error:
if [ ! 1 ]; then make -k all; \
else make -k all NOPUSH=1;fi
make: Fatal error: Command failed for target `k’
Error running Makefile.
-bash-3.00#

The worst of this is that i could not find a solution on the Net, so i investigated by my self and it was really very simple, the problem occurs because the Makefile has instructed inside to build the maps from the plain text files you use, so you have to make sure that this files really exist, and that they exist in the correct place, if the file do not exists, create it with:


touch

I am thinking that it may be usefull to show you which files i have setup, in a later article i may explain each of them but for now i just put their names, so make sure no file is missing:

auto_home
auto_master
bootparams
ethers
group
hosts
ipnodes
netgroup
netmasks
networks
passwd
project
protocols
publickey
rpc
security
services
shadow
timezone
user_attr