If you're running debian/ubuntu:
* package "nis" must be installed and configured (see /etc/default/nis)
* /etc/defaultdomain configured (part of nis configuration)
* append your nis server in /etc/yp.conf if broadcast doesn't work
* start nis service
* modify /etc/passwd or /etc/nsswitch.conf to use nis for login ...
I found this link
NIS HOWTO from this
post