1847763 Members
4086 Online
104013 Solutions
New Discussion

NIS - byuid

 
Ian Bissix
Occasional Contributor

NIS - byuid

We inadvertently ran a ypmake on a client NIS machine (which crashed part way through).

Whenever a user tried to log in they were identified as root (a whoami command returned an "Intruder Alert" message).

Did a ypwhich -m and for all entries this seemed normal except for the passwd.byuid which was now no longer pointing to the server but rather to the client.

Did a ypset and then restarted the nis.server which seemed to cure the problem but upon rebooting the server we immediately got the same issues (users identified as root) again.

Repeated the fix above (ypset etc) and once again we were working but preumeably this will just happen again if we reboot the client or the server. How can I make this mapping permanent.

many thanks

Ian
8 REPLIES 8
Robert-Jan Goossens
Honored Contributor

Re: NIS - byuid

Hi Ian,

Check below file, your NIS settings should be

/etc/rc.config.d/namesvrs
NIS_MASTER_SERVER=0
NIS_SLAVE_SERVER=0
NIS_CLIENT=1

Regards,
Robert-Jan
Ian Bissix
Occasional Contributor

Re: NIS - byuid

Hi Robert-Jan

I checked these files and they are indeed different, having:

NIS_MASTER_SERVER=0
NIS_SLAVE_SERVER=1
NIS_CLIENT=1

But this seems to be consistent across all of our clients using NIS and we are not seeing this issue elsewhere.

cheers

Ian
Robert-Jan Goossens
Honored Contributor

Re: NIS - byuid

and is your NIS_DOMAIN= pointing to the correct domain ?

Robert-Jan
Ian Bissix
Occasional Contributor

Re: NIS - byuid

Yep - looking in the namesvrs file the NIS_DOMAIN is correct.
Robert-Jan Goossens
Honored Contributor

Re: NIS - byuid

Ian,

a bit strange to have "NIS_SLAVE_SERVER=1" set on a NIS client.

---
Steps to setup a NIS Master Server, NIS Slaves, and NIS Clients DocId: KBAN00000276

http://www4.itrc.hp.com/service/cki/docDisplay.do?docLocale=en_US&docId=200000080360992
---

are you sure it is only a NIS client ?

Robert-Jan
Ian Bissix
Occasional Contributor

Re: NIS - byuid


They do seem to be very strange settings - unfortunately this is an inherited system and so I have no idea as to why any particular settings were chosed. My concern there is that they do match all of the other clients which dont seem to have a problem.

Could they all be servers relaying data on driven by the master server? IF I look at the master server then the settings are:

NIS_MASTER_SERVER=1
NIS_SLAVE_SERVER=0
NIS_CLIENT=1

Which would seem to support that.

Equally, it was only the passwd.byuid that had the wrong (local) server when doing the ypwhich -m and I would have thought that there would be more errors there if the NIS_SERVER


Robert-Jan Goossens
Honored Contributor

Re: NIS - byuid

Could you check if below file displays the correct NIS server?

/var/yp/binding//ypservers

Robert-Jan
Ian Bissix
Occasional Contributor

Re: NIS - byuid


That directory does not seem to exist I am afraid.

The /var/yp/binding directory is there but no other directories.

There is a file in /var/yp/binding/ called:

.2

and that is all.