Subject: Re: Console login fails with NIS
To: Manuel Bouyer <bouyer@antioche.eu.org>
From: Greywolf <greywolf@starwolf.com>
List: current-users
Date: 06/10/2005 11:03:07
Manuel Bouyer wrote:

>On Fri, Jun 10, 2005 at 03:48:21PM +0300, Martti Kuparinen wrote:
>  
>
>>Matthias Scheler wrote:
>>
>>    
>>
>>>>- why is NIS database queries done with local accounts?
>>>>        
>>>>
>>>What does your "/etc/nsswitch.conf" look like?
>>>      
>>>
>>I've not modified that file so it looks like this:
>>
>>group:          compat
>>group_compat:   nis
>>hosts:          files dns
>>netgroup:       files [notfound=return] nis
>>networks:       files
>>passwd:         compat
>>passwd_compat:  nis
>>shells:         files
>>
>>I also have +::::::::: as the last line in /etc/master.passwd
>>and +::: in /etc/group.
>>
>>I tested this on a similar NIS client (NetBSD/i386 2.0.2): I removed
>>the + lines and put this instead of the existing group, group_compat,
>>passwd and passwd_compat entries:
>>
>>group:          files nis
>>passwd:		files nis
>>
>>Then I disconnected the network cable and tried to login as root
>>but I'm still getting these NIS related (yp_something) timeouts so
>>clearly NIS is used even with root logins. What am I doing wrong?
>>    
>>
>
>I suspect that, even if the root account is local, it still needs to access
>NIS to know to which groups it belongs.
>
>  
>
This is correct.  NIS is not hanging on the user but on the group.

As groups tend to change less frequently than users do, and considering 
I only have two machines,
I tend to copy the group file between machines when I do an edit.

It's the easiest way.

-- 
				--*greywolf;