Operating System - HP-UX
1834882 Members
2013 Online
110071 Solutions
New Discussion

Re: Combining password file

 
brian_31
Super Advisor

Combining password file

We are currently having two servers(server A & server B) on different networks each being the NIS master of the respective networks. Now we would like to combine them and make server A as the NIS master of both the networks with server B as slave. After adding server B, i want to make sure the all the current NIS users on serverB will be present in the server A's NIS maps or in other words i want all the users of serverA and server B combined so that all of them will have access to both serverA and server B with server A as master and server B as slave. Could anyone guide here?

Thanks

Brian.
5 REPLIES 5
Patrick Wallek
Honored Contributor

Re: Combining password file

You could just combine the password files, BUT you absolutely must make sure that ALL UIDs are UNIQUE.

If you have two independent NIS servers, chances are that you will have users that share a UID (unless you were really careful with user setup).

Auditing and correcting the UID issue is the first and biggest step.

After that, combining them should be fairly easy.

Good luck.
Sridhar Bhaskarla
Honored Contributor

Re: Combining password file

Hi Brian,

Patrick had a good point. Ensure that the uids do not duplicate. Instead of directly merging them to /etc/passwd, merge them in /etc/passwd.new and then run pwck against /etc/passwd.new and find out if there are any errors. Once everything is good, then you can move it to the correct place.

-Sri
You may be disappointed if you fail, but you are doomed if you don't try
brian_31
Super Advisor

Re: Combining password file

Thanks for the reply. I have a passwd.nis files on both the machines and i think there are lot of users there with the same userd id's on both the servers but with different UID's. As i look at the passwd.nis file even the group id's are different. Now, i am not sure how i sync up. Pl. advise

Thanks

Brian.

Sridhar Bhaskarla
Honored Contributor

Re: Combining password file

Hi Brian,

You don't have a choice except to change the UIDs to unique on both the systems if you are planning to merge the password entries. It may be a lot of work as you will have to change the ownerships of all the files owned by the affected users.

-Sri
You may be disappointed if you fail, but you are doomed if you don't try
Sยภเl Kย๓คг
Respected Contributor

Re: Combining password file

Yes Dear No shortcuts spend some time and do it.cEnsure that all the UIDs are unque on both the system.As sri said it is difficult task but if u are planning to do it proceed.
regrds
SK
Your imagination is the preview of your life's coming attractions