Networking
cancel
Showing results for 
Search instead for 
Did you mean: 

NIS master and clients process and files owner by root

 
SOLVED
Go to solution
Highlighted
Occasional Advisor

NIS master and clients process and files owner by root

Hi,

I have a NIS Master server and several Clients of it and I realize that all the processes and files that should be owne by root appears owne by 0 (the number that actually is root into the /etc/passwd).

I already check the /etc/passwd and also the NIS passwd for any incorrect entry of the number 0 user and nothing is wrong.

this is an example of it

daemon 1971 1 0 Oct 20 ? 0:00 grmd

0 1706 1704 0 Oct 20 ? 0:00 /usr/sbin/nfsd 4

0 1708 1704 0 Oct 20 ? 0:00 /usr/sbin/nfsd 4

0 1709 1706 0 Oct 20 ? 0:00 /usr/sbin/nfsd 4

Any idea?

regards,

 

9 REPLIES 9

Re: NIS master and clients process and files owner by root

>all the processes and files that should be owned by root appears owned by 0

 

What does your last few lines of /etc/passwd look like?

Something like:

+::-2:-2:::

 

 

Highlighted
Occasional Advisor

Re: NIS master and clients process and files owner by root

Actually not, there are a few users ID and everything

 

x1234:Hz64S/eM59BcE:117:76:Users name:/tmp/x1234:/sbin/sh
y1234:I5D0wl/A4IRLE:118:1604:Users name:/home/y1234:/sbin/sh
z1234:8FSLDRqdQJnrA:130:4506:Users name:/home/z1234:/sbin/sh

 

Regards,

Highlighted
Honored Contributor

Re: NIS master and clients process and files owner by root

What are the permissions on /etc/passwd?  Is it readable by everyone?  It should be rw-r--r-- for permissions.

 

 

Highlighted
Occasional Advisor

Re: NIS master and clients process and files owner by root

I added the +::-2:-2::: to the /etc/passwd and stop the nis.client and nis.server. Once I started the nis.server everything looks fine onwer root. but when I started nis.client again is the owner 0
Highlighted
Occasional Advisor

Re: NIS master and clients process and files owner by root

NIS Master server

-r--r--r-- 1 0 other 2025 Dec 13 08:58 /etc/passwd

 

 

Highlighted

Re: NIS master and clients process and files owner by root

>NIS Master server

 

How about the permissions on passwd on the NIS clients?

Highlighted
Occasional Advisor

Re: NIS master and clients process and files owner by root

-r--r--r-- 1 0 sys 2865 Dec 13 09:08 /etc/passwd

 

I made a couple of tests, and the owner change when I started nis.master

Highlighted
Occasional Advisor
Solution

Re: NIS master and clients process and files owner by root

I looks that it was a problem with the 2nd line on the /etc/passwd on the master. It was deleted and everything came back to root

root:FxuOpg9A:0:3::/:/sbin/sh
droot:R6TEgWb7FU:0:3::/:/sbin/sh  ---- line deleted

thanks

Highlighted
Honored Contributor

Re: NIS master and clients process and files owner by root

Do you have an /etc/nsswitch.conf file? If you have such a file, what does it say in the "passwd:" line?

 

I haven't worked too much with NIS, but I was under the impression that the +/- syntax like "+::-2:-2:::" would require having the passwd source specified as "compat" in nsswitch.conf.

 

The behaviour of your system sounds like you might have nsswitch.conf settings like:

passwd: nis [NOTFOUND=return] files

 This would use /etc/passwd if nis.client is stopped, but when nis.client is running successfully, it would use NIS information only. If the requested data was not found in the NIS, a failure would be returned even though /etc/passwd might contain valid data.

 

Run "ypcat passwd | grep '^root:'" if there is no output, then the NIS data does not include the root account. With a nsswitch.conf settings like above, that would explain why things seem to break for root as soon as the nis.client is started.

MK