1842668 Members
1796 Online
110208 Solutions
New Discussion

NIS problems

 
SOLVED
Go to solution
Mike Seerden
Advisor

NIS problems

Hi all you NIS guru's, I have in my setup a SUN E450 (Solaris 2.6) that is my NIS master (Not NIS+) and I have many other SUN systems that are working great. I add a user account and the SUN's know about it immediately. It takes my two N class servers sometimes 1-2 days to recognize the new account. One N class is bound to the other N class and the master is listed as the SUN. I run

ypinit -s SUN-NIS-master-hostname

and all the maps transfer over but they still don't recognize the new user id. Now, when I run
ypcat on the password the new account is there but trying to su to it gives unknown id. Any ideas on how to get the HP's to recognize the new user id's right away. Sorry about mentioning the SUN's, but I do have quite a mixed environment.
Thanks, Mike
4 REPLIES 4
Jesper Sivertsen
Frequent Advisor

Re: NIS problems

Hi there

You have to be sure that nis is using the nis passwords. There are to ways to do that.

In /etc/nsswitch.conf you can have:

passwd: files

That means that if the uid or username is not found in /etc/passwd it wil use nis.

If you have:

passwd: compat

That means that you have to put in a "+" in the /etc/passwd file. Put it after the last user in the file. Then if the user or uid is not found, the + means use nis.

I hope this helps, if this is the problem i can not understand if it wors after some days ??

God luck
Jesper
All in unix is files
Mike Seerden
Advisor

Re: NIS problems

The nsswitch.conf is set up the way you mentioned and I have has NIS running well for about a year. The passwd file does have a + at the end. Very strange. Any more help??? Thanks,

Mike
Shannon Petry
Honored Contributor
Solution

Re: NIS problems

I'll assume from your description that 1 Nclass is a slave server to the SunE450, and the other is a plain old client.

Are you running any ypupdate scripts on the HP? Are you running yppush on the sun to update slaves?

In "/var/yp/" there are several scripts for different maps.
ypxfr_1perday
ypxfr_1perhour
ypxfr_2perday

Are any of these scheduled in cron?

I usually use ypxfr_1perhour and modify with any maps that need to be updated frequently. I modify it to make sure that it talks to the correct master, and gets the needed maps.

Schedule in cron like:
1 * * * * /var/yp/ypxfr_1perhour 1>>/dev/null 2>>/dev/null

This should alleviate your problems by forcing the correct action!

Regards,
Shannon
Microsoft. When do you want a virus today?
Mike Seerden
Advisor

Re: NIS problems

Yes Shannon you are exactly right in your description of my NIS environment and also the cron worked perfect. Thanks so much. Nice to have this great resource available.

Mike