Solaris Troubleshooting NIS: add a user for NIS maps when passwd file is not in the /etc directory
Below procedure can be used to add a new NIS user when the passwd file is not in the /etc directory
Steps to Follow
The example below demonstrates how to add a user for NIS maps when the passwd file is not in the /etc directory.
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 Johnl
Edit /etc/passwd to Add entry for the user
# vi /etc/passwd
Assign a password to the new user.
Now run below command to create an entry in the shadow file
cat /etc/shadow file to see this entry in there.
Just copy the new 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.