Subject: Re: gen usr AS root with YP
To: Jason Thorpe <thorpej@nas.nasa.gov>
From: Michael Richardson <mcr@sandelman.ottawa.on.ca>
List: port-sparc
Date: 11/19/1996 12:08:19
>>>>> "Jason" == Jason Thorpe <thorpej@nas.nasa.gov> writes:
    >> Actually, I saw this happen as well.  It seems that the NetBSD
    >> implementation requires that you leave the uid/gid fields blank
    >> rather than use zeros as the password routines on the NIS
    >> client side will not ignore them as most other implementations
    >> do.

    Jason> This is actually a feature, as explained in the passwd(5)
    Jason> manual page.  It allows a system administrator to map some
    Jason> or all users to `nobody's uid, for example.

  Nevertheless, this isn't something an experienced NIS administrator
is likely to read.

    >> This could have some serious implications for the "naive
    >> administrator" who expects NIS to follow certain conventions.

    Jason> Well, it is documented (in a fairly obvious place), so I
    Jason> don't really consider it a bug.

  It isn't a bug. If you remap to uid=0, that is likely wrong. A
waring from pwd_mkdb would accomplish the goal.	
	if(userid[0]='+' && uid=0) {
		print warning;
	}

  I just looked at pwd_mkdb.c, and see that this is almost easy,
except that the password line is cracked in a library routine. It
looks like the change may be better put in the libc routines that
parse things in the YP.

   :!mcr!:            |  Network security consulting and 
   Michael Richardson |      contract programming
 WWW: mcr@sandelman.ottawa.on.ca. PGP key available.