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
Step 1.
Edit /etc/passwd to Add entry for the user
# vi /etc/passwd
Johnl:x:107:14:John l:/export/home/johnl:/bin/csh
Assign a password to the new user.
passwd johnl
Step 2:
Now run below command to create an entry in the shadow file
# pwconv
cat /etc/shadow file to see this entry in there.
johnl:dhXRywfkSELcE:10091::::::
Step 3:
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.