Solaris Troubleshooting NIS : Adding user to NIS, when passwd file is not in /etc
The NIS directory is /etc/nisdir, where all the NIS maps reside. Create a user in the /etc/passwd file.
In this example, the new user is afzal.
# vi /etc/passwd
afzal:x:107:14:naeem afzal:/export/home/afzal:/bin/csh <== add entry
Assign a password to the new user.
# passwd afzal
Now run this command to create an entry in the shadow file
# cat /etc/shadow <== to check user entry in there.
Copy over these two entries to the /etc/nisdir/passwd file for passwd entry, and /etc/nisdir/shadow for shadow entry. To update the passwd map and push it to the slaves.
# make passwd
NOTE : If you do not want this new user to be a local user, delete the entries in /etc/passwd and /etc/shadow.