1847093 Members
6231 Online
110262 Solutions
New Discussion

NIS NOVICE

 
SOLVED
Go to solution
Nobody's Hero
Valued Contributor

NIS NOVICE

Can someone help me. I am going to try to set up a NIS server. I'm in the dark here, never tried this b4. Do I have to make sure that all my users on all my other systems have the same id number? (in passwd file). If I have to, is there an easy way to do this?

Thanks,
Bob
UNIX IS GOOD
6 REPLIES 6
S.K. Chan
Honored Contributor

Re: NIS NOVICE

Attached is the process ..
Corthouts Carlo
Valued Contributor

Re: NIS NOVICE

Best is to give the users the same id on NIS as on the other systems.

This way you avoid problems with permissions on files they create.

If necessary on certain machines you give them other id's on local machines and change the lookup order for passwd in nsswitch.conf.

A. Clay Stephenson
Acclaimed Contributor
Solution

Re: NIS NOVICE

Hi Robert,

The simple answer is yes but there are a few rules. On an NIS client, if a user is found in /etc/passwd before the '+' entry is found then the local passwd entry wins. In that case the uid could be different on different clients but that is not generally considered a desirable thing. The idea is that on all your clients the passwd file will be very sparse (root,lp,uucp, ...) with perhaps 10 total entries and then the '+' entry. You really need to rcp or ftp all you passwd files into a common directory and then look for duplicates. The thing you don't want is for uid 125 to be 'mmouse' on one client and 'dduck' on another. If you do have dupliucate uids then you are going to have to assign one of them a new uid and then use a find -exec to chown all the files from the old uid to the new uid.

It appears that you have some work to do.

Regards, Clay
If it ain't broke, I can fix that.
Nobody's Hero
Valued Contributor

Re: NIS NOVICE

OK, sometimes I'm as sharp as a bowling ball.
John has accounts on 10 unix boxes. All his accounts have a different id#. Should I logon to each box and make sure his id number is the same accross the platform.

Thanks,
Bob
UNIX IS GOOD
S.K. Chan
Honored Contributor

Re: NIS NOVICE

Sorry, didn't quite answer all your qs.

>Do I have to make sure that all my users on >all my other systems have the same id number? >(in passwd file). If I have to, is there an >easy way to do this?

Basically you need to consolidate all your UIDs from other systems, any clients that you want to be included in the NIS domain that you're about to setup has to have a unique UID. You could probably write a script to extract all the UIDs and make comparison and decide which UID to use in a case of duplicate ones.

Nobody's Hero
Valued Contributor

Re: NIS NOVICE

Thanks,
A.Clay. just the answer I was looking for.

Best Regards and Thanks.
UNIX IS GOOD