The easiest way is to enable the "c2security" feature in NIS, to do this you create a file called $(PWDIR}/security/passwd.adjunct (unless you have changed your /var/yp/Makefile the path would be /etc/security/passwd.adjunct ) and then run "make".
This should solve that problem.
NB; i haven't used this feature for 10 years or so, so its advisable that you check your nearest manual before enabling it ;) Or at least test it first...
7/M.