Operating System - HP-UX
1827331 Members
5959 Online
109963 Solutions
New Discussion

Re: Adding user accts in NIS

 
Craig A. Sharp
Super Advisor

Adding user accts in NIS

Hello SA's,

I am not clear on adding a new user on a system that uses NIS.

I have several workstations that use NIS for auth and resolution.

When I need to add a new user, do I do the addition from the master NIS server or do I need to add the user at each workstation?

I am sorry if this is a basic question.

Thanks,

Craig
4 REPLIES 4
Patrick Wallek
Honored Contributor

Re: Adding user accts in NIS

If you're using NIS and need to add a user, you should add the user on your NIS server and then re-make your NIS map so that the clients can see the new user.

If you added the user on the clients, you have essentially defeated the purpose of using NIS. :)
Santosh Nair_1
Honored Contributor

Re: Adding user accts in NIS

Craig,

In addition to adding the user on the NIS server and pushing out the maps, remember to make the user's home directory available on the client.

-Santosh
Life is what's happening while you're busy making other plans
A. Clay Stephenson
Acclaimed Contributor

Re: Adding user accts in NIS

Hi Craig:

The easiest method is to add the user in your normal fashion on the NIS master server. You then cd to /var/yp and 'make' to rebuild and push the maps. However, this does not create the user's home directory on the client boxes. You will need to do that using rcp, remsh, or some other method taking care to properly set proper permissions and ownerships. If you are using the automounter to manage the users home directory, then you only have to create the home directory on one machine and then no matter on which client the user logs in, he has only one home directory which may in fact be on a machine far away. The only time this method gets tricky is if your are supported many different flavors of platforms and many flavors of UNIX and a given user can login anywhere. The .profiles get rather tricky in that case but it can be done.

Regards, Clay
If it ain't broke, I can fix that.
Craig A. Sharp
Super Advisor

Re: Adding user accts in NIS

Excellent answers.

We hard mount the users home directories nfs to one system. It actually happens to be the NIS master server also so when a user logs in to the client, they are pointed to the hard mount for the users home directories.

If I am understanding what happens when I create a new user, the passwd file is updated on the NIS master server and then when I remake the maps, that information becomes available to the clients in the network. Being the fact that the users home dirs are a mount on the client, I am all set.

Craig