[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: perl or libc6 bug?: getpwnam('root') in NIS environment



On Wed, Apr 14, 1999 at 11:28:36PM -0400, Michael Stone wrote:
: On Thu, Apr 15, 1999 at 12:08:30AM +0200, Heiko Schlittermann wrote:
: > With mangling OFF I get the shadow entry for root from the NIS server.
: > `ypmatch root passwd' returns `no such key' or similar
: > `ypmatch root shadow.byname' returns the approbiate line from the shadow
: > file ...
: > 
: > I can always lookup the shadow.byname map completly.  (Not so for
: > passwd!)
: > 
: > With mangling ON it's a little bit cleaner ... but not completly clean.
: > Why is the root (and other low uid) entry hidden from passwd.byname, but
: > not from shadow.byname?
: 
: You're not being entirely clear here. Do ordinary users get the
: passwords when doing ypmatch on shadow.byname? Did you enable mangling
: for shadow.byname in /etc/ypserv.conf? 

Mangling enabled:   ordinary users get `x'           for ypmatch root shadow.byname
Mangling disabled:  ordinary users get 'LKDFdfaev.4' for ypmatch root shadow.byname
 
: As to why root's entry exists in shadow.byname, it's because the
: exclusion rules are based on uid's--which don't exist in the shadow

Ah.  Understand.
With this background the above is correct.

The remaining question is: 

    -- NIS pw mangle -- caller ---- perl' (getpwnam('root'))[1] ----

        ON               root       local hash  
        ON               joe        `x'

        OFF              root       local hash
        OFF              joe        servers hash


... the problem only exists, 
    -> IFF the arg of getpwnam is a user with local _and_ remote identity.
    -> IFF mangling is off.

    Best Regards from Dresden/Germany
    Viele Gruesse aus Dresden
    Heiko Schlittermann
-- 
[internet & unix support ----------------- Heiko Schlittermann]
[<a href="http://debian.schlittermann.de/";> Debian 2.1 CD </a>]
[Heiko Schlittermann HS12-RIPE finger:heiko@schlittermann.de -]
[pgp: A1 7D F6 7B 69 73 48 35  E1 DE 21 A7 A8 9A 77 92 -------]


Reply to: